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

dependency: update to electron 25 and node 18 #27715

Merged
merged 31 commits into from
Sep 7, 2023

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Aug 31, 2023

Additional details

Updates Cypress to use Electron v25 and Node v18. Node v16 is EOL on 9/11/23 and Electron v21 has not been supported for a few months at this point. This gets us to more recent versions for our app

We were unable to upgrade Electron between major versions due to an issue with mksnapshot, which was patched in v25, hence the large jump in versions

Ideally we want to release this close to or before September 11, 2023 to coincide with Node 16's EOL

Changes to support Node 18 / Electron 25

  • @types/node are bumped to latest v18 compatible version
  • in CircleCI, we are using the Cypress internal image cypress/browsers-internal:node18.15.0-chrome114-ff115 which has the similar capabilities as the older node 16 image. We are not using the factory as we need xauth, curl, and a few environment variables omitted that are present by default.
  • mock-fs needed to be updated from 5.1 to 5.2 to work with Node 18 and address a few BIgINT issues in CI e983963
  • Also needed to update some of the electron functions for integrity checks as the reference just changed between versions 92b9d0a
  • Need to patch achrinza/node-ipc for @vue/cli-service in component system tests to get node 18 support. we likely should cut these over to create-vue as @vue/cli-service is deprecated.
  • Allow use of SEC level 0 ciphers in system tests to test TLSv1. This isn't an issue with cypress, but the express server that is started that is using TLSv1 on Node 18 needs access to the correct cipher, which is why this arg is needed f48a01e
  • remove node_gyp_bins from the binary as they arent needed and were causing symlink issues in darwin electron builds
  • remove some of the additionals to sqllite3 as they are unnecessary in the binary
  • we need to update cypress-realworld-app to use Node 18, so for now to get this to work we need to have --ignore-engines in the install script for the binary tests
  • Since we test against cypress-example-recipes and cypress-realworld-app, those runtimes also need to be Node 18 compatible. To accomplish this, I have:

Changes to Support Chrome 114 and Firefox 115

Chrome 114
  • The largest difference with Chrome 114 is the headless=new option being set to default, with the user agent no longer reflecting a headless implementation. There is also a bug in the new headless with --window-size where the height is not set correctly. The issue is marked as Fixed inside chromium's repository, but users are still reporting this bug. For now, I have the snapshots updated to reflect the current value, but once this is fixed we should incorporate the correct defaults
Firefox 115
  • click events no longer fire when a button is typed into, which meant tweaking some tests
  • Error objects are now serializable, meaning that a lot of our tests to check for object cloning in firefox for cy.origin() needed to be updated

Steps to test

How has the user experience changed?

PR Tasks

@AtofStryker AtofStryker changed the title chore: update electron25 and node18 chore: update to electron 25 and node 18 Aug 31, 2023
@AtofStryker AtofStryker force-pushed the chore/update_electron25_and_node18 branch 4 times, most recently from e0194de to df87126 Compare August 31, 2023 03:59
@cypress
Copy link

cypress bot commented Aug 31, 2023

26 flaky tests on run #50875 ↗︎

0 28100 1345 0 Flakiness 26

Details:

Merge branch 'chore/update_electron25_and_node18' of https://github.com/cypress-...
Project: cypress Commit: afd11edeae
Status: Passed Duration: 18:35 💡
Started: Sep 7, 2023 7:36 PM Ended: Sep 7, 2023 7:54 PM
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-firefox

View Output Video

Test Artifacts
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-electron

View Output Video

Test Artifacts
... > correctly returns currentRetry Test Replay Output
... > correctly returns currentRetry Test Replay Output
... > correctly returns currentRetry Test Replay Output
Flakiness  specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e

View Output Video

Test Artifacts
App/Cloud Integration - Latest runs and Average duration > when no runs are recorded > shows placeholders for all visible specs Test Replay Output Screenshots
Flakiness  migration.cy.ts • 1 flaky test • launchpad-e2e

View Output Video

Test Artifacts
Migrate custom config files > completes journey for migration-custom-config-file-respect-pathname Test Replay Output Screenshots
Flakiness  project-setup.cy.ts • 3 flaky tests • launchpad-e2e

View Output Video

Test Artifacts
... > skips the setup page when choosing e2e tests to run Test Replay Output Screenshots
... > skips the setup steps when choosing component tests to run Test Replay Output Screenshots
Launchpad: Setup Project > switch testing types > takes the user to first step of e2e setup when switching from app Test Replay Output Screenshots

The first 5 flaky specs are shown, see all 12 specs in Cypress Cloud.

Review all test suite changes for PR #27715 ↗︎

@AtofStryker AtofStryker force-pushed the chore/update_electron25_and_node18 branch 6 times, most recently from 60dbde9 to ad5ef3e Compare August 31, 2023 14:15
@@ -917,7 +917,7 @@ describe('config/src/project/utils', () => {

return mergeDefaults(obj, {}, {}, this.getFilesByGlob)
.then((cfg) => {
expect(cfg.env).to.deep.eq({
expect(cfg.env).to.deep.include({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

factory variables are making their way into the process here, such as CACHE_VERSION and FACTORY_NODE_DEFAULT_VERSION https://app.circleci.com/pipelines/github/cypress-io/cypress/56495/workflows/a9f3e3d2-48cd-43ee-a67f-cc226a514905/jobs/2342148/tests#failed-test-2

@AtofStryker AtofStryker force-pushed the chore/update_electron25_and_node18 branch 2 times, most recently from f858e5d to e1540b0 Compare August 31, 2023 17:57
@AtofStryker
Copy link
Contributor Author

the required snyk jobs would need to change from (16.x) to (18.x)

.circleci/workflows.yml Outdated Show resolved Hide resolved
@AtofStryker AtofStryker force-pushed the chore/update_electron25_and_node18 branch 10 times, most recently from 96d7459 to 1d1827d Compare September 2, 2023 19:01
@AtofStryker AtofStryker force-pushed the chore/update_electron25_and_node18 branch 2 times, most recently from a89d006 to 58c8fb2 Compare September 3, 2023 22:21
@AtofStryker
Copy link
Contributor Author

@ryanthemanuel I can't tell if this test is just super flaky, or if a log was inserted. any ideas? app.circleci.com/pipelines/github/cypress-io/cypress/56568/workflows/f1c4e139-1b9e-4617-b29e-775cff16bbcf/jobs/2346514

Might be good to get @mschile's take too? I think he wrote those originally.

@mschile are you able to take a look at this? That test is still failing and I am unsure if I should update the snapshot or if this is really just severe flake.

@mschile
Copy link
Contributor

mschile commented Sep 7, 2023

@AtofStryker, I'll take a look. It doesn't look like it's been flaking on develop.

@AtofStryker
Copy link
Contributor Author

AtofStryker commented Sep 7, 2023

@mschile I think the order of the logs just changed, though I am not entirely sure why. I committed what was being shown in CI if you want to see the diff 8939182

@nagash77 nagash77 merged commit b85dd75 into develop Sep 7, 2023
7 of 14 checks passed
@nagash77 nagash77 deleted the chore/update_electron25_and_node18 branch September 7, 2023 19:26
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 12, 2023

Released in 13.2.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.2.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Sep 12, 2023
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.

Upgrade Electron to v25
5 participants