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
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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!

artifactRetentionDays: 14
# Bump Node memory limit
NODE_OPTIONS: "--max_old_space_size=4096"
Expand All @@ -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?

echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString"
fi
- uses: actions/checkout@v3
- name: Set up Node (16)
uses: actions/setup-node@v3
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test-changed-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

name: Test Auth

on: pull_request
on: [push, pull_request]

env:
# make chromedriver detect installed Chrome version and download the corresponding driver
Expand All @@ -23,6 +23,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
# Bump Node memory limit
NODE_OPTIONS: "--max_old_space_size=4096"

Expand All @@ -34,9 +35,17 @@ jobs:
steps:
# install Chrome first, so the correct version of webdriver can be installed by chromedriver
# when setting up the repo
#
# Note: we only need to check the chrome version change in one job as the warning annotation
# is appended to the entire workflow results, not just this job's results.
- name: install Chrome stable
run: |
npx @puppeteer/browsers install chrome@stable
chromeVersionString=$(ls chrome)
if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then
echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString"
fi
- name: Checkout Repo
uses: actions/checkout@master
with:
Expand Down