chore(ci): cache Jest transforms in the Reassure perf jobs - #100297
Draft
WojtekBoman wants to merge 5 commits into
Draft
chore(ci): cache Jest transforms in the Reassure perf jobs#100297WojtekBoman wants to merge 5 commits into
WojtekBoman wants to merge 5 commits into
Conversation
Contributor
Author
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9632d94cc7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
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.
Explanation of Change
The Reassure perf jobs re-transformed ~7,000 files through Babel on every run, 45% of each measure job (217.0s cold vs 119.7s warm). They now restore a Jest transform cache written on
mainby a newseedJestPerfCache.yml, called fromseedStickyDisks.yml. Restore-only and norestore-keys, so a fork PR can never write the shared entry. Also addsconcurrencycancellation and abun:testguard on the shared key.Fixed Issues
$
PROPOSAL:
Tests
Open this PR and let the
Run performance testsworkflow run.Open the
baseline-perf-testsjob log and expandRestore Jest transform cache. Verify the step reports a cache hit for a key of the formLinux-X64-jest-perf-<hash>(on the very first run after merge tomaina miss is expected, since the entry has not been seeded yet).Expand
Report Jest cache sizein the same job. Verify the run annotation reads roughlyJest perf cache: ~120MB, ~7000 files, notabsentand not double that size.Repeat steps 2-3 for the
perf-tests(branch) job. Verify both measure jobs restore the exact same key.Verify that the perf comparison comment is still posted on the PR and that render counts are unchanged from before this PR (
COUNT_DEVIATION: 0must not start firing).Push a second commit to this PR while the first
Run performance testsrun is still in progress.Verify the in-flight run is cancelled by the new
concurrencygroup and only the newest run continues, and that no other PR's perf run is cancelled.On a checkout of this branch, run
npm run test:bun -- tests/tooling/jestPerfCacheKey.test.ts.Verify all tests pass.
Edit any one of the four
.jest-cachekey:values in.github/workflows/reassurePerformanceTests.ymlor.github/workflows/seedJestPerfCache.ymlso it differs by a single character, re-run the test file, and verifykeys every .jest-cache step identicallyfails. Revert the edit.Add a
restore-keys:entry to any of those four steps, re-run, and verifynever falls back to a prefix keyfails. Revert the edit.Remove the
seedJestPerfCachejob from.github/workflows/seedStickyDisks.yml, re-run, and verifyis reachable from a push to mainfails. Revert the edit.Offline tests
N/A - this PR only changes GitHub Actions workflows and a tooling test. It touches no app code, no API calls, and no Onyx data.
QA Steps
N/A - CI-only change with no user-facing surface. Same as tests: verification happens in the GitHub Actions logs on
mainafter merge, whereSeed Jest perf cacheshould run as part ofSeed sticky diskson each push, skip the ~220s populate when the entry is already present, and re-populate it after a toolchain change to the lockfile,patches/**,babel.config.js,config/babel/**,jest.config.js, or.nvmrc.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari