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

chore: parallelize test-binary-against-recipes CI step #27570

Merged
merged 6 commits into from
Aug 18, 2023

Conversation

astone123
Copy link
Contributor

Additional details

According to CircleCI insights, test-binary-against-recipes is the longest-running job that we have in our CI pipeline (it only runs on develop and other branches specified in mainBuildFilters). It's p95 runtime for the past 30 days is 25m 14s. Because it runs in parallel with the rest of the binary tasks, we need to wait for it to complete to release Cypress, re-run the workflow from failed, etc. This adds a lot of time to our development cycle.

This PR uses the existing chunking logic in the test-examples.js script in cypress-example-recipes to split these tests across 4 machines. This brings the runtime in line with the rest of the binary steps, so we're not over-optimizing, just optimizing enough so that the runtime for all of the binary steps are within 1 minute or so of eachother.

This should significantly decrease the average runtime for our linux-x64 workflow on develop.

Steps to test

Look at the CI runs for this branch and specifically the test-binary-against-recipes job.

How has the user experience changed?

n/a

PR Tasks

@@ -1,5 +1,6 @@
{
"name": "internal-scripts",
"version": "0.0.0-development",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an un-related drive-by change. There's a warning in the console any time we run any task saying that scripts is missing a version. This is just to make that warning go away

Copy link
Contributor

Choose a reason for hiding this comment

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

Been wanting to do this as well

@cypress
Copy link

cypress bot commented Aug 16, 2023

12 flaky tests on run #50046 ↗︎

0 5325 78 0 Flakiness 12

Details:

re-build snapshot if re-built
Project: cypress Commit: 7fb4da09cb
Status: Passed Duration: 17:04 💡
Started: Aug 16, 2023 9:51 PM Ended: Aug 16, 2023 10:08 PM
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output Video
Flakiness  e2e/origin/commands/misc.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin misc > .end() Output Video
Flakiness  e2e/origin/commands/navigation.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin navigation > .go() Output Video
Flakiness  e2e/origin/integrity.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
Integrity Preservation > <script> tags > preserves integrity with static <script> in HTML with SHA256 integrity. Output Video
Flakiness  e2e/origin/commands/spies_stubs_clocks.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
cy.origin spies, stubs, and clock > spy() Output Video

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

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@astone123 astone123 changed the base branch from develop to lerna-optimize-tasks August 18, 2023 14:37
@astone123 astone123 force-pushed the astone123/parallelize-recipes branch from 7fb4da0 to 771ded3 Compare August 18, 2023 14:38
@astone123 astone123 merged commit 3b2d30d into lerna-optimize-tasks Aug 18, 2023
@astone123 astone123 deleted the astone123/parallelize-recipes branch August 18, 2023 14:38
dkasper-was-taken added a commit that referenced this pull request Oct 4, 2023
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec6.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeb.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <[email protected]>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <[email protected]>
Co-authored-by: Dave Kasper <[email protected]>
astone123 added a commit that referenced this pull request Oct 16, 2023
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec6.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeb.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <[email protected]>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <[email protected]>
Co-authored-by: Dave Kasper <[email protected]>
astone123 added a commit that referenced this pull request Oct 16, 2023
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec6.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeb.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <[email protected]>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <[email protected]>
Co-authored-by: Dave Kasper <[email protected]>
astone123 added a commit that referenced this pull request Oct 16, 2023
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec6.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeb.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <[email protected]>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <[email protected]>
Co-authored-by: Dave Kasper <[email protected]>
astone123 added a commit that referenced this pull request Oct 17, 2023
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec6.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeb.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <[email protected]>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <[email protected]>
Co-authored-by: Dave Kasper <[email protected]>
astone123 added a commit that referenced this pull request Oct 18, 2023
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec6.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeb.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <[email protected]>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <[email protected]>
Co-authored-by: Dave Kasper <[email protected]>
astone123 added a commit that referenced this pull request Oct 18, 2023
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec6.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeb.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <[email protected]>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <[email protected]>
Co-authored-by: Dave Kasper <[email protected]>
astone123 added a commit that referenced this pull request Oct 18, 2023
* Revert "chore: simplify build script (#27547)"

This reverts commit 0a86ec6.

* Revert "chore: upgrade lerna to 6, cache build step (#26913)"

This reverts commit 9e60aeb.

* [run ci]

* chore: upgrade lerna to 6, cache build step (#26913)

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update build-npm-modules script

* chore: update lerna to 6

* [run ci]

* try caching build step

* we can't clean without building after

* add dependencies on scripts for npm packages

* update commands

* add config for data-context build step

* fix output configurations for npm packages, add gitignores

* revert changes to config and data-context build steps

* fix outputs

* run with cache

* fix outputs for cli

* actually fix outputs

* test with cache

---------

Co-authored-by: astone123 <[email protected]>

* chore: simplify build script (#27547)

* chore: simplify build script

* update CI workflows

* fix workflows

* empty commit because Percy weirdness

* chore: add driver, reporter, config as implicit dependencies for runner package (#27559)

* run all workflows on branch

* chore: parallelize test-binary-against-recipes CI step (#27570)

* chore: fix some easy circular dependencies in dep graph (#27612)

* chore: remove gulp tasks from postinstall (#27616)

* empty commit

* chore: minor improvements to node_modules_install (#27647)

* chore: fix cypress:open and dev scripts

* run with cache [run ci]

* exclude mochaawesome assets from .yarnclean [run ci]

* bump cache again [run ci]

* run cached [run ci]

* chore: do not cache cli build step [run ci]

* update workflow command and docs for build-cli [run ci]

* fix commands that use scope [run ci]

* use different branch for publish repo [run ci]

* percy weirdness? [run ci]

* fix postbuild cli script [run ci]

* try to remove typescript from production binary [run ci]

* fix circular dependency [run ci]

* try removing ts from node_modules [run ci]

* remove typescript resolution [run ci]

* remove redundant target scripts

* update to lerna scoped commands

* remove unneeded yarn in lerna command

* try to fix Electron install in Windows workflow

---------

Co-authored-by: Jordan <[email protected]>
Co-authored-by: Dave Kasper <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decrease runtime for testing binary against recipes
3 participants