Skip to content
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

Cacie/chore/upgrade electron 27 #28544

Closed
wants to merge 75 commits into from
Closed
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
8a6c4ab
dependency: upgrades electron from 25 to 26
cacieprins Dec 11, 2023
a89659c
bump cache run ci
cacieprins Dec 11, 2023
139487b
fix docker img names
cacieprins Dec 11, 2023
f3229ed
ref electron upgrade branch
cacieprins Dec 11, 2023
3a453b0
chore: updating v8 snapshot cache
Dec 11, 2023
032a165
chore: updating v8 snapshot cache
Dec 11, 2023
185cf86
chore: updating v8 snapshot cache
Dec 11, 2023
45a220e
debug
cacieprins Dec 12, 2023
c1fcdb1
debug
cacieprins Dec 12, 2023
509e499
debug
cacieprins Dec 12, 2023
7912db2
update search string for resize observer error swallow
cacieprins Dec 12, 2023
f875b0a
debug
cacieprins Dec 12, 2023
b1c1d52
update integrity check
cacieprins Dec 12, 2023
58b1349
update electron readme with upgrade troubleshooting section
cacieprins Dec 13, 2023
b32a1e2
point to new publish binary workflow branch for electron 27
cacieprins Dec 13, 2023
3bb82dd
update electron readme with locations of chromium & node versions for…
cacieprins Dec 13, 2023
a0bd74d
update node versions and docker image refs
cacieprins Dec 13, 2023
1066e37
update electron version to 27.1.3
cacieprins Dec 13, 2023
acaaea6
fix db nativeBinding arg
cacieprins Dec 13, 2023
b76511d
chore: updating v8 snapshot cache
Dec 13, 2023
eae7513
install setuptools on mac when updating v8 snapshot cache
cacieprins Dec 13, 2023
a6ac000
chore: updating v8 snapshot cache
Dec 14, 2023
e7e48ad
chore: updating v8 snapshot cache
Dec 14, 2023
f843948
run workflows on this branch run ci
cacieprins Dec 14, 2023
6e64ceb
require addon directly and pass to better-sqlite3 init; debug
cacieprins Dec 14, 2023
9a3af58
rm debug
cacieprins Dec 14, 2023
a63fde1
try loading better-sqlite with a more dynamic filename
cacieprins Dec 14, 2023
3961271
bump electron version
ryanthemanuel Dec 14, 2023
4e0d91e
bump electron version
ryanthemanuel Dec 14, 2023
7d80f77
bump electron version -- run ci
ryanthemanuel Dec 15, 2023
f4fb6c4
bump electron version -- run ci
ryanthemanuel Dec 15, 2023
8dadce3
bump electron version -- run ci
ryanthemanuel Dec 15, 2023
016923e
bump electron version -- run ci
ryanthemanuel Dec 15, 2023
0d05c41
bump electron version -- run ci
ryanthemanuel Dec 15, 2023
4a4ae23
add a step to update workflows.yml to electron upgrade process
cacieprins Dec 15, 2023
8895708
Merge branch 'develop' into cacie/chore/upgrade-electron-27
cacieprins Dec 15, 2023
e091dfb
reduce retry limit on issue 1244 test to prevent circle from thinking…
cacieprins Dec 15, 2023
bfee9dd
target main branch of binary publish workflow? run ci
cacieprins Dec 15, 2023
665e81c
Update .node-version -- run ci
ryanthemanuel Dec 16, 2023
0c0ff5a
Update CHANGELOG.md
cacieprins Dec 18, 2023
a882362
Update module_api_spec.ts
cacieprins Dec 18, 2023
b55e8e0
point publish binary back to electron upgrade branch
cacieprins Dec 18, 2023
6475305
Adds some logging re: cachedDataVersion
cacieprins Dec 18, 2023
35e10a3
use precise electron version for better-sqlite3 for centos7
cacieprins Dec 19, 2023
4dbac8e
Update CHANGELOG.md
cacieprins Dec 19, 2023
2049685
chore: fix issue with bytenode (#28568)
ryanthemanuel Dec 21, 2023
98bf7b2
update electron upgrade steps
cacieprins Dec 19, 2023
42c115b
Merge branch 'develop' into cacie/chore/upgrade-electron-27
cacieprins Jan 9, 2024
8a99704
Update packages/electron/README.md
cacieprins Jan 9, 2024
3a02fec
Update cli/CHANGELOG.md
cacieprins Jan 9, 2024
a9ece8a
fix DebugEmptyStates component test
cacieprins Jan 9, 2024
ac7091d
Merge branch 'develop' into cacie/chore/upgrade-electron-27
cacieprins Jan 11, 2024
c1209c6
try to fix downstream build -- run ci (#28649)
ryanthemanuel Jan 12, 2024
a7a5a6b
point to consolidated binary publish branch
cacieprins Jan 12, 2024
4849187
revert webpack-preprocessor-awesome-typescript-loader update
cacieprins Jan 12, 2024
382dbc5
revert certain system tests
cacieprins Jan 16, 2024
fab6898
increase padding for module api system test duration window
cacieprins Jan 16, 2024
aa09aa8
account for differing screenshot sizes
cacieprins Jan 16, 2024
a4673ca
screenshot size differs locally vs ci
cacieprins Jan 16, 2024
9dd9ab1
Merge branch 'develop' into cacie/chore/upgrade-electron-27
cacieprins Jan 17, 2024
ab49bc1
update protocol snapshots
cacieprins Jan 19, 2024
f48e6f0
Merge branch 'develop' into cacie/chore/upgrade-electron-27
cacieprins Jan 19, 2024
fabb6a1
Update after-pack-hook.js
ryanthemanuel Jan 22, 2024
bb2a882
Merge branch 'develop' into cacie/chore/upgrade-electron-27
cacieprins Jan 22, 2024
219e4f6
fix flaky slideshow
cacieprins Jan 22, 2024
7468022
Merge branch 'develop' into cacie/chore/upgrade-electron-27
cacieprins Jan 23, 2024
d257809
correct the chromium version in changelog
cacieprins Jan 24, 2024
5816027
chore: update release process guide with refactored release-automatio…
AtofStryker Jan 23, 2024
e3eb46c
docs: add pnpm to readme (#28781)
MikeMcC399 Jan 23, 2024
71c1bf3
chore: Update Chrome (beta) to 121.0.6167.85 (#28778)
github-actions[bot] Jan 23, 2024
8d8a547
chore(deps): update dependency vite [security] (#28773)
renovate[bot] Jan 23, 2024
21977f8
fix: issue with service workers in test replay when they're initiated…
ryanthemanuel Jan 23, 2024
7c6646f
chore: update octokit and arm64 image to newest focal (#28754)
AtofStryker Jan 24, 2024
1f8bce9
use node 18.17.1 internal images
cacieprins Jan 24, 2024
307e709
Merge branch 'develop' into cacie/chore/upgrade-electron-27
cacieprins Jan 24, 2024
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
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

11-20-23
12-15-23
12 changes: 8 additions & 4 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ mainBuildFilters: &mainBuildFilters
- 'feature/experimental-retries'
- 'publish-binary'
- 'em/shallow-checkout'
- 'cacie/chore/upgrade-electron-27'

# 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 @@ -45,6 +46,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ 'feature/experimental-retries', << pipeline.git.branch >> ]
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
- equal: [ 'cacie/chore/upgrade-electron-27', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -59,6 +61,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ]
- equal: [ 'chore/bump_loaders_and_optimize_webpack', << pipeline.git.branch >> ]
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
- equal: [ 'cacie/chore/upgrade-electron-27', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -86,6 +89,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ]
- equal: [ 'em/shallow-checkout', << pipeline.git.branch >> ]
- equal: [ 'mschile/mochaEvents_win_sep', << pipeline.git.branch >> ]
- equal: [ 'cacie/chore/upgrade-electron-27', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -94,7 +98,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers-internal:node18.15.0-chrome114-ff115
- image: cypress/browsers-internal:node18.17.0-chrome118-ff115
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
resource_class: medium
environment:
Expand All @@ -104,7 +108,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers-internal:node18.15.0-chrome114-ff115
- image: cypress/browsers-internal:node18.17.0-chrome118-ff115
user: node
environment:
PLATFORM: linux
Expand Down Expand Up @@ -557,7 +561,7 @@ commands:
if [[ ! -f better_sqlite3.node ]]; then
docker run -d --name centos7-builder centos7-builder /bin/bash -c "sleep 1000000000"
docker cp ~/cypress/node_modules/better-sqlite3 centos7-builder:/better-sqlite3
docker exec -it centos7-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 25.0.0 --include-regex 'better_sqlite3.node$'"
docker exec -it centos7-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 27.0.0 --include-regex 'better_sqlite3.node$'"
docker cp centos7-builder:/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node
docker rm -f centos7-builder
cp ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/better_sqlite3.node
Expand Down Expand Up @@ -2342,7 +2346,7 @@ jobs:
<<: *defaults
resource_class: small
docker:
- image: cypress/base-internal:18.15.0
- image: cypress/base-internal:18.17.0
steps:
- maybe_skip_binary_jobs
- restore_workspace_binaries
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v18.15.0
placeholder: ex. v18.17.0
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2-memory-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v18.15.0
placeholder: ex. v18.17.0
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/3-install-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v18.15.0
placeholder: ex. v18.17.0
validations:
required: true
- type: dropdown
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/update_v8_snapshot_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- name: Determine snapshot files - Mac
if: ${{ matrix.platform == 'macos-latest' }}
run: echo "SNAPSHOT_FILES='tooling/v8-snapshot/cache/darwin/snapshot-meta.json'" >> $GITHUB_ENV
- name: Install setuptools - Mac
if: ${{ matrix.platform == 'macos-latest' }}
run: sudo -H pip install setuptools
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.15.0
18.17.1
2 changes: 1 addition & 1 deletion centos7-builder.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM centos:7
# Install dependencies for re-building better-sqlite and setting devtoolset-8 as the default compiler
# Install dependencies for re-building better-sqlite and setting devtoolset-8 as the default compiler.
RUN yum -y install centos-release-scl curl python3 make atk-devel atk java-atk-wrapper at-spi2-atk gtk3 libXt libdrm mesa-libgbm Xvfb && yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++
RUN echo >> /etc/profile.d/devtoolset-8.sh 'source scl_source enable devtoolset-8'
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
Expand Down
8 changes: 7 additions & 1 deletion cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 13.6.2
## 13.7.0

_Released 12/19/2023 (PENDING)_

Expand All @@ -13,6 +13,12 @@ _Released 12/19/2023 (PENDING)_

- Updated ts-node from `10.9.1` to `10.9.2`. Fixed in [#28528](https://github.com/cypress-io/cypress/pull/28528).

**Misc:**

- Upgraded `electron` from `25.8.4` to `26.6.2`
- Upgraded bundled Node.js version from `18.15.0` to `18.17.0`
- Upraded bundled Chromium version from `114.0.5735.289` to `116.0.5845.228`

## 13.6.1

_Released 12/5/2023_
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
- .:/opt/cypress
ci:
# This should mirror the image used in workflows.yml
image: cypress/browsers-internal:node18.15.0-chrome114-ff115
image: cypress/browsers-internal:node18.17.0-chrome118-ff115
ports:
- 5566:5566
- 5567:5567
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"dedent": "^0.7.0",
"del": "3.0.0",
"detect-port": "^1.3.0",
"electron": "25.8.4",
"electron": "27.1.3",
"electron-builder": "^23.6.0",
"enzyme-adapter-react-16": "1.12.1",
"eslint": "7.22.0",
Expand Down Expand Up @@ -212,7 +212,7 @@
"yarn-deduplicate": "3.1.0"
},
"engines": {
"node": ">=18.15.0",
"node": ">=18.17.0",
Copy link
Member

Choose a reason for hiding this comment

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

This would be non-passive to bump for yarn projects

Copy link
Member

Choose a reason for hiding this comment

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

wait -- my bad -- this is our for our development version. This is fine. I mistook this for cli/package.json.

"yarn": ">=1.17.3"
},
"productName": "Cypress",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/component/support/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ registerMountFn({ plugins: [() => createRouter(), () => pinia] })

installCustomPercyCommand()

Cypress.on('uncaught:exception', (err) => !err.message.includes('ResizeObserver loop limit exceeded'))
Cypress.on('uncaught:exception', (err) => !err.message.includes('ResizeObserver loop completed with undelivered notifications.'))
Cypress.Commands.add('tabUntil', tabUntil)
2 changes: 1 addition & 1 deletion packages/driver/cypress/e2e/issues/1244.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('issue 1244', () => {
})

// TODO: fix flaky test
it('does not strip link _parent', { retries: 15 }, () => {
it('does not strip link _parent', { retries: 5 }, () => {
cy.get('iframe').then(($iframe) => {
const $el = $iframe.contents().find('a.inline_parent')

Expand Down
35 changes: 30 additions & 5 deletions packages/electron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Upgrading `electron` involves more than just bumping this package's `package.jso
- the major version number of Node.js changes, since users rely on the bundled Node.js to load plugins and `.js` fixtures, or
- there are changes to Electron that require new shared libraries to be installed on Linux, breaking existing CI setups, or
- there is some other change that would break existing usage of Cypress (for example, a Web API feature being removed/added to the bundled Chromium)
- [ ] **Create and publish Docker `base-internal` and `browsers-internal` family images matching the Node.js and Chromium versions in Electron.** These images live inside the [`cypress-docker-images`](https://github.com/cypress-io/cypress-docker-images/) repository. The `browsers-internal` image will be used inside our CI pipelines. The `base-internal` image will be used by the `browsers-internal` image and possibly other system images (described below). For general use of Cypress in Docker, we encourage the use of the [Cypress Docker Factory](https://github.com/cypress-io/cypress-docker-images#cypressfactory). This works great for using Cypress as an end user, but doesn't fully suit the needs for developing Cypress, as we require:
- [ ] **Create and publish Docker `base-internal` and `browsers-internal` family images matching the Node.js and Chromium versions in Electron.** These images live inside the [`cypress-docker-images`](https://github.com/cypress-io/cypress-docker-images/) repository. The `browsers-internal` image will be used inside our CI pipelines. The `base-internal` image will be used by the `browsers-internal` image and possibly other system images (described below). The Chromium version can be determined from the [DEPS](https://github.com/electron/electron/blob/main/DEPS) file in Electron's repository on the correct tag. The Node version can be determined from the [Electron Releases page](https://www.electronjs.org/docs/latest/tutorial/electron-timelines). For general use of Cypress in Docker, we encourage the use of the [Cypress Docker Factory](https://github.com/cypress-io/cypress-docker-images#cypressfactory). This works great for using Cypress as an end user, but doesn't fully suit the needs for developing Cypress, as we require:
- The installation of packages, such as `curl`, `xauth`, and `build-essential`/`make` needed for our [`circleci`](../../.circleci/config.yml) jobs/pipelines.
- Specific images targeted to test Cypress on various node versions and distributions of linux, such as different versions of `ubuntu`.

Expand All @@ -45,19 +45,44 @@ Upgrading `electron` involves more than just bumping this package's `package.jso
- The Ubuntu images in [base-internal](https://github.com/cypress-io/cypress-docker-images/tree/master/base-internal) are updated to be used in the [system binary tests](../../system-tests/test-binary) if any of the following are true for the images used inside the system binary tests:
- The last two major [Ubuntu LTS Releases](https://ubuntu.com/about/release-cycle) are out-of-date.
- The [NodeJS](https://nodejs.org/en) version is not the active LTS.
- [ ] **Update `workflows.yml`**
- [ ] Ensure it references the new `base-internal` and `browsers-internal` Docker images
- [ ] Ensure the new Electron version is used as a build target in the `Build better-sqlite3 for CentOS 7` step
- [ ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [ ]

It looks like this line should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, Mike! Still making sure all of the rest of things are working as expected, so this file will likely change some more before it's marked ready for review.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure. I'll hold back until the PR is marked for review.


- [ ] **Ensure that a matching Node.js version is enforced in the monorepo for local development and CI.** When Electron is upgraded, oftentimes, the bundled Node.js version that comes with Electron is updated as well. Because all unit and integration tests run in normal Node.js (not Electron's Node.js), it's important for this Node.js version to be synced with the monorepo. There are a few places where this needs to be done:
- [ ] [`/.node-version`](../../.node-version) - used by `nvm` and other Node version managers
- [ ] `@types/node` used throughout the monorepo to determine compatible node types. The major version of this package must reflect the node version set in [`/.node-version`](../../.node-version).
- [ ] [github workflows](../../.github) - used for repository templates, vulnerability detection, and V8 snapshots. If the node version for Snyk needs to be updated, then the required pull request check into `develop` must also be updated. A repository administrator will need to accomplish this.
- [ ] [`/package.json`](../../package.json) - update `engines`
- [ ] [`/scripts/run-docker-local.sh`](../../scripts/run-docker-local.sh) - update Docker image to the new matching `browsers` image
- [ ] [`docker-compose.yml`](../../docker-compose.yml) - update Docker image to the new matching `browsers` image
- [ ] [`/system-tests/test-binary/*`](../../system-tests/test-binary) - update binary system tests to use the newly published Ubuntu and Node images mentioned above, if applicable
- [ ] [`/.circleci/config.yml`](../../.circleci/config.yml)
- Update the Docker `image`s to the new matching `browsers` image.
- Update the `xcode` version to one with the same major Node.js version bundled. There is usually not an exact match, this is ok as long as the major version number as the same.
- [ ] Do a global search for the old Node.js version to identify any new areas that may need updating/unification, and update those locations (and this document!)
- [ ] Do a global search for the old Node.js version to identify any new areas that may need updating/unification, and update those locations (and this document!)

- [ ] For **binary publishing**, make sure the `electron` version that we updated in [`/package.json`](../../package.json) matches the `electron` version inside the [publish binary project](https://github.com/cypress-io/cypress-publish-binary/blob/main/package.json). This is to make sure add-on tests inside the publish-binary repository work locally, but are not required to install the correct version of `electron` in CI when publishing the binary. Ensure the electron target in this project's .circleci configuration is updated as well. Set the target branch on that project as a `branch` property on the request body in [../../scripts/binary/trigger-publish-binary-pipeline.js](../../scripts/binary/trigger-publish-binary-pipeline.js) script, so that you can test in CI. Remove this before merging, and ensure that branch is merged as well.


- [ ] **Manually smoke test `cypress open`.** Upgrading Electron can break the `desktop-gui` in unexpected ways. Since testing in this area is weak, double-check that things like launching `cypress open`, signing into Cypress Cloud, and launching Electron tests still work.
- [] **Manually smoke test `cypress run` in record mode** Upgrading Electron can cause `better-sqlite3` to SIGSEGV the Electron process.
cacieprins marked this conversation as resolved.
Show resolved Hide resolved
- [ ] **Fix failing tests.** Usually, these are due to breaking changes in either Node.js or Electron. Check the changelogs of both to find relevant changes.
- [ ] For **binary publishing**, make sure the `electron` version that we updated in [`/package.json`](../../package.json) matches the `electron` version inside the [publish binary project](https://github.com/cypress-io/cypress-publish-binary/blob/main/package.json). This is to make sure add-on tests inside the publish-binary repository work locally, but are not required to install the correct version of `electron` in CI when publishing the binary.
- [ ] If needed, update the **[V8 Snapshot Cache](https://github.com/cypress-io/cypress/actions/workflows/update_v8_snapshot_cache.yml)** by running the workflow. Make sure to use the branch that contains the electron updates to populate the `'workflow from'` and `'branch to update'` arguments. Select `'Generate from scratch'` and `'commit directly to branch'`. This will usually take 6-8 hours to complete and is best to not be actively developing on the branch when this workflow runs.

- [ ] If needed, update the **[V8 Snapshot Cache](https://github.com/cypress-io/cypress/actions/workflows/update_v8_snapshot_cache.yml)** by running the GitHub workflow. Make sure to use the branch that contains the electron updates to populate the `'workflow from'` and `'branch to update'` arguments. Select `'Generate from scratch'` and `'commit directly to branch'`. This will usually take 6-8 hours to complete and is best to not be actively developing on the branch when this workflow runs.


### Common Upgrade Issues

#### Integrity Check Failures

*Solution*: Update the string representation of `fs.readFileSync` in [scripts/binary/binary-integrity-check-source.js](../../scripts/binary/binary-integrity-check-source.js) to match the string generated by the new version of electron. Create a throw-away script and simply `console.log(fs.readFileSync.toString())`, and execute it with *Electron* rather than *Node*.

#### ResizeObserver errors in Component Test

*Solution*: This error is benign. From time to time, the error message we match against in order to swallow the error changes. Update the necessary support files with the new error message.

#### Electron crashes immediately after initializing the Protocol database

*Solution*: ???

2 changes: 1 addition & 1 deletion packages/frontend-shared/cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function validateWithinViewport (subject: JQuery<HTMLElement>): Cypress.Chainabl

Cypress.Commands.add('validateWithinViewport', { prevSubject: true }, validateWithinViewport)

Cypress.on('uncaught:exception', (err) => !err.message.includes('ResizeObserver loop limit exceeded'))
Cypress.on('uncaught:exception', (err) => !err.message.includes('ResizeObserver loop completed with undelivered notifications.'))

registerMountFn()
addVueCommand()
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-shared/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ function getAutIframe () {
return cy.get('iframe.aut-iframe').its('0.contentDocument.documentElement').then(cy.wrap) as Cypress.Chainable<JQuery<HTMLIFrameElement>>
}

Cypress.on('uncaught:exception', (err) => !err.message.includes('ResizeObserver loop limit exceeded'))
Cypress.on('uncaught:exception', (err) => !err.message.includes('ResizeObserver loop completed with undelivered notifications.'))

Cypress.Commands.add('scaffoldProject', scaffoldProject)

Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/cloud/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class ProtocolManager implements ProtocolManagerShape {
debug('connecting to database at %s', dbPath)

const db = Database(dbPath, {
nativeBinding: path.join(require.resolve('better-sqlite3/build/Release/better_sqlite3.node')),
nativeBinding: require.resolve(path.join('better-sqlite3', 'build', 'Release', 'better_sqlite3.node')),
verbose: debugVerbose,
})

Expand Down
3 changes: 3 additions & 0 deletions scripts/binary/binary-cleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const del = require('del')
const esbuild = require('esbuild')
const tempDir = require('temp-dir')
const workingDir = path.join(tempDir, 'binary-cleanup-workdir')
const v8 = require('v8')

fs.ensureDirSync(workingDir)

Expand Down Expand Up @@ -144,6 +145,8 @@ const createServerEntryPointBundle = async (buildAppDir) => {

console.log(`compiling server entry point bundle to ${path.join(buildAppDir, 'packages', 'server', 'index.jsc')}`)

console.log('cachedDataVersionTag: ', v8.cachedDataVersionTag())

// Use bytenode to compile the entry point bundle. This will save time on the v8 compile step and ensure the integrity of the entry point
const bytenode = await import('bytenode')

Expand Down
Loading
Loading