feat: Balance acceptance CI shards using recorded test timings#6878
Draft
danskmt wants to merge 1 commit into
Draft
feat: Balance acceptance CI shards using recorded test timings#6878danskmt wants to merge 1 commit into
danskmt wants to merge 1 commit into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
a046794 to
c4622de
Compare
c4622de to
9ee7c61
Compare
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.
Pull Request Submission Checklist
What does this PR do?
Replaces Jest’s default count/alphabetical
--shardsplit with a timing-aware sequencer so parallel acceptance jobs finish closer together. Addstest-timings.json(per-file weights from CI) and wires it via--testSequencerontest:acceptance. Enablesjest-junitaddFileAttributefor future timing refreshes.Where should the reviewer start?
test/jest/timingSequencer.js— LPT bin-packing inshard()test/jest/test-timings.json— recorded acceptance runtimes (ms)package.json—test:acceptancesequencer flag andaddFileAttributeHow should this be manually tested?
npx jest --testPathPattern timingSequencer.spec.tsif the unit test is included in a follow-up.main(expect smaller spread between fastest/slowest shard).What's the product update that needs to be communicated to CLI users?
None. CI-only change; no CLI behavior change for end users.
Risk assessment (Low | Medium | High)?
Low
Any background context you want to provide?
Jest’s built-in sharding splits by file count, so one shard can pick up slow specs (e.g. snyk-code user journey ~7 min) while others finish much earlier. The custom sequencer assigns each file to the lightest shard by estimated runtime.
What are the relevant tickets?
CLI-1482
Screenshots (if appropriate)
N/A