Add --partition slice:M/N for round-robin test slicing#767
Merged
Conversation
Closes #587. Slices the collected test set after sorting by qualified name, keeping only tests at positions matching slice M of N. Validation on the M/N values lives in PartitionSelection's FromStr.
Merging this PR will not alter performance
|
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.
Summary
Adds a
--partition slice:M/Nflag tokarva testfor splitting a test run across CI jobs. Tests are sorted by qualified name and distributed round-robin: test 1 to slice 1, test 2 to slice 2, ..., testN+1to slice 1, and so on. Running everyslice:1/Nthroughslice:N/Ntogether covers every collected test exactly once.The slice is applied inside
partition_collected_testsafter the--last-failedfilter and before bin-packing across workers, so it composes with both. Slice membership shifts when the test set changes, which is the documented tradeoff against a hash-based scheme — the upside is no historical data is required.Closes #587.
Test Plan
ci