Skip to content

[Auth CI] Log warning if chrome version has changed #7872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Dec 15, 2023

Conversation

DellaBitta
Copy link
Contributor

@DellaBitta DellaBitta commented Dec 14, 2023

Discussion

The GitHub Action CI installs the latest version of Chrome. There have been occurrences in the past when the Auth tests suddenly, and unexpectedly, started to fail, and after hours of investigation it was determined that the root cause of the problem was a silent upgrade of the Chrome version that we tested against.

While pinning the chrome version would keep the tests from suddenly failing, this solution has some drawbacks. 1: we're not testing against the latest version of chrome. 2: it will take someone to remember to update the version of chrome periodically, and this might fall to the wayside over time.

As an alternative, this solution will cause the CI workflow to produce an annotation warning if the chrome version has suddenly changed. If tests fail, the engineer investigating the tests can see clearly that the chrome version has changed, and perhaps this is what caused the test to fail.

There will be some burden of support. An engineer will have to update an environment variable in the workflow which stores the last valid version of chrome that we tested against. But forgetting to update this value is preferable to forgetting to update the version of chrome (if we were to pin it), so this seems like the better course of action overall.

Testing

CI run with the annotation from an intentionally mangled chrome version name to force the warning:

Screenshot 2023-12-14 at 9 12 45 AM

API Changes

N/A

Copy link

changeset-bot bot commented Dec 14, 2023

⚠️ No Changeset found

Latest commit: 8cfec21

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@DellaBitta DellaBitta marked this pull request as ready for review December 14, 2023 14:17
@DellaBitta DellaBitta requested a review from a team as a code owner December 14, 2023 14:17
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 14, 2023

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 14, 2023

@@ -39,6 +40,11 @@ jobs:
- name: install Chrome stable
run: |
npx @puppeteer/browsers install chrome@stable
chromeVersionString=$(ls chrome)
if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this stand out in the workflow in any way if the tests fail? I'm guessing contributors will look at the failed step further down if tests fail, is there anything to direct them to look at this one?

@@ -25,6 +25,7 @@ env:
# the beahvior to use the new URLs.
CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/
CHROMEDRIVER_CDNBINARIESURL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/
CHROME_VALIDATED_VERSION: linux-120.0.6099.71

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this possible that this line can be automatically updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not easily, unless you have any ideas!

@DellaBitta DellaBitta merged commit 8b389a2 into master Dec 15, 2023
@DellaBitta DellaBitta deleted the ddb-chrome-version-warnings branch December 15, 2023 01:43
@firebase firebase locked and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants