ENG-3233: Optimize Cypress CI with shared build and better sharding#7792
Draft
gilluminate wants to merge 6 commits intomainfrom
Draft
ENG-3233: Optimize Cypress CI with shared build and better sharding#7792gilluminate wants to merge 6 commits intomainfrom
gilluminate wants to merge 6 commits intomainfrom
Conversation
- Add a dedicated build job that runs npm ci + next build once and shares the artifact across all matrix jobs, eliminating ~5 min of redundant build work per shard - Replace test-count sharding heuristic with file-size-based bin-packing, which better correlates with actual execution time - Increase parallel groups from 5 to 7 to reduce wall time per shard - Run build and prepare-matrix in parallel since they're independent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
The Cypress binary lives at ~/.cache/Cypress, not in node_modules, so it wasn't included in the shared build artifact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use actions/cache keyed on package-lock.json hash to persist node_modules and ~/.cache/Cypress between workflow runs. The build artifact now only carries .next and fides-js/dist, which are the only outputs that change per-commit. On cache hit the build job skips npm ci entirely. Matrix jobs use a read-only cache restore (fail-on-cache-miss since the build job always runs first and populates the cache). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket ENG-3233
Description Of Changes
Optimize the Admin UI Cypress CI workflow to reduce wall-time and total compute. Each of the 5 parallel matrix jobs was independently running
npm ci(~1m20s) andnext build(~4min), duplicating ~6 min of build work per job (~30 min total wasted compute). The actual Cypress test execution was only 4-7 min per shard.Code Changes
buildjob that runsnpm ci+ builds once, compresses artifacts into a tarball, and uploads for matrix jobs to download - eliminates redundant build workbuildandprepare-matrixin parallel since they have no dependency on each other, shaving ~30s of serial waitit(/test(occurrences) with file-size-based bin-packing, which better correlates with actual execution time since heavier tests have more intercepts, fixtures, and setup codebuildjobSteps to Confirm
buildjob completes and uploads thecypress-buildartifactnpm ciornext buildstepsmain(target: ~8 min vs current ~13 min)Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works