Skip to content

chore: Update Chrome (stable) to 137.0.7151.55 #31794

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
Show file tree
Hide file tree
Changes from all commits
Commits
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
54 changes: 46 additions & 8 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1

chrome-stable-version: &chrome-stable-version "136.0.7103.113"
chrome-stable-version: &chrome-stable-version "137.0.7151.55"
chrome-beta-version: &chrome-beta-version "137.0.7151.40"
firefox-stable-version: &firefox-stable-version "137.0"

Expand Down Expand Up @@ -38,7 +38,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'misc/chore/fix_sinon_chai_rewrite'
- 'update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -49,7 +49,11 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'misc/throw_error_on_extension_chrome_137', << pipeline.git.branch >> ]
- equal:
[
'update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40',
<< pipeline.git.branch >>
]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -60,7 +64,11 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'misc/throw_error_on_extension_chrome_137', << pipeline.git.branch >> ]
- equal:
[
'update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40',
<< pipeline.git.branch >>
]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -83,7 +91,11 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'misc/throw_error_on_extension_chrome_137', << pipeline.git.branch >> ]
- equal:
[
'update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40',
<< pipeline.git.branch >>
]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -157,7 +169,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "misc/throw_error_on_extension_chrome_137" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "update-chrome-stable-from-136.0.7103.113-beta-from-137.0.7151.40" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
Expand Down Expand Up @@ -562,6 +574,20 @@ commands:
type: string
# latest can also be used here
default: *chrome-stable-version
install-chrome-for-testing:
description: whether or not to install google chrome for testing
type: boolean
default: false
google-chrome-for-testing-channel:
description: Google Chrome for Testing channel to install
type: string
# can be stable, beta, dev, or canary
default: stable
google-chrome-for-testing-version:
description: Google Chrome for Testing version to install
type: string
# latest can also be used here
default: *chrome-stable-version
install-firefox:
description: whether or not to install firefox
type: boolean
Expand Down Expand Up @@ -603,8 +629,19 @@ commands:
# which we do not expect and errors out when running Cypress
name: remove linked google-chrome binary
command: |
rm /usr/bin/google-chrome

rm /usr/bin/google-chrome
- when:
condition:
equal: [ true, << parameters.install-chrome-for-testing >> ]
steps:
- run:
name: Install Chrome for Testing and link it to google-chrome
command: |
INSTALL_OUTPUT=$(npx @puppeteer/browsers install chrome@<<parameters.google-chrome-version>> --path /tmp/chrome-for-testing)
DOWNLOAD_DIR=$(echo "$INSTALL_OUTPUT" | grep -o '\/.*\/chrome-linux64')
mv $DOWNLOAD_DIR /opt/chrome-for-testing
ln -fs /opt/chrome-for-testing/chrome /usr/local/bin/chrome
rm -rf /tmp/chrome-for-testing
# This code builds better-sqlite3 on Debian 10 (Buster). This is necessary because Debian 10 has the oldest glibc version (2.28) that we support.
#
# Since this is running Docker remote (because the job running the command may not be using an executor with the appropriate glibc version), we need to
Expand Down Expand Up @@ -855,6 +892,7 @@ commands:
- install-webkit-deps
- install-browsers:
install-chrome: true
install-chrome-for-testing: true
install-firefox: true
- run:
name: Run system tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ context('cy.visit performance tests', function () {
}

systemTests.it('passes', {
browser: '!webkit', // TODO(webkit): does this really need to run in all browsers? currently it's broken in webkit because we are missing deps
// chrome-for-testing is being skipped here because it isn't available in CI and we are performance testing in chrome. This can always be un-skipped if needed to performance test chrome for testing.
browser: ['!webkit', '!chrome-for-testing'], // TODO(webkit): does this really need to run in all browsers? currently it's broken in webkit because we are missing deps
configFile: 'cypress-performance.config.js',
onStdout,
spec: 'fast_visit.cy.js',
Expand Down
4 changes: 2 additions & 2 deletions system-tests/lib/normalizeStdout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import os from 'os'

export const e2ePath = Fixtures.projectPath('e2e')

export const DEFAULT_BROWSERS = ['electron', 'chrome', 'firefox', 'webkit']
export const DEFAULT_BROWSERS = ['electron', 'chrome', 'chrome-for-testing', 'firefox', 'webkit']

export const pathUpToProjectName = Fixtures.projectPath('')

export const browserNameVersionRe = /(Browser\:\s+)(Custom |)(Electron|Chrome|Canary|Chromium|Firefox|WebKit)(\s\d+)(\s\(\w+\))?(\s+)/
export const browserNameVersionRe = /(Browser\:\s+)(Custom |)(Electron|Chrome|Chrome for Testing|Canary|Chromium|Firefox|WebKit)(\s\d+)(\s\(\w+\))?(\s+)/

const availableBrowsersRe = /(Available browsers found on your system are:)([\s\S]+)/g
const crossOriginErrorRe = /(Blocked a frame .* from accessing a cross-origin frame.*|Permission denied.*cross-origin object.*)/gm
Expand Down
10 changes: 7 additions & 3 deletions system-tests/lib/system-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ require(`@packages/server/lib/project-base`)

type CypressConfig = { [key: string]: any }

export type BrowserName = 'electron' | 'firefox' | 'chrome' | 'webkit'
| '!electron' | '!chrome' | '!firefox' | '!webkit'
export type BrowserName = 'electron' | 'firefox' | 'chrome' | 'chrome-for-testing' | 'webkit'
| '!electron' | '!chrome' | '!chrome-for-testing' | '!firefox' | '!webkit'

type ExecResult = {
code: number
Expand Down Expand Up @@ -865,7 +865,11 @@ const systemTests = {
const { browser } = options

if (browser && !customBrowserPath) {
expect(String(browser).toLowerCase()).to.eq(browserName.toLowerCase())
if (browser === 'chrome-for-testing') {
expect(String(browser).toLowerCase()).to.eq(browserName.toLowerCase().replaceAll(' ', '-'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to replace the spaces?

Copy link
Contributor

Choose a reason for hiding this comment

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

its checking for chrome for testing because the logic just takes the browser name and makes it lower case, when I have it named chrome-for-testing. Felt better to have the hyphens as the name as its consistent with our current naming

} else {
expect(String(browser).toLowerCase()).to.eq(browserName.toLowerCase())
}
}

expect(parseFloat(version)).to.be.a.number
Expand Down
3 changes: 2 additions & 1 deletion system-tests/test/before_browser_launch_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ describe('e2e before:browser:launch', () => {
})

systemTests.it('can add extensions', {
browser: '!webkit', // TODO(webkit): fix+unskip, or skip and add a test that this fails with WebKit
// as of Chrome 137, --load-extension does not work in chrome branded. In order to test this, we need to use the chrome-for-testing browser or chromium.
browser: ['!webkit', '!chrome'], // TODO(webkit): fix+unskip, or skip and add a test that this fails with WebKit
spec: 'spec.cy.js',
headed: true,
project: 'browser-extensions',
Expand Down
3 changes: 2 additions & 1 deletion system-tests/test/plugins_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ describe('e2e plugins', function () {
})

systemTests.it('works with user extensions', {
browser: 'chrome',
// as of Chrome 137, --load-extension does not work in chrome branded browsers. In order to test this, we need to use the chrome-for-testing browser or chromium.
browser: 'chrome-for-testing',
spec: 'app.cy.js',
headed: true,
project: 'plugin-extension',
Expand Down
Loading