ci: increase unit test partitions from 8 to 12#5
Open
huth-stacks wants to merge 1 commit into
Open
Conversation
68dee00 to
72e3443
Compare
Add a Python script that reads JUnit XML timing data from previous CI runs and uses greedy bin-packing to distribute tests into time-balanced partitions. Falls back to hash-based partitioning when no timing data is available (first run, or data expired). New files: .github/scripts/split-tests-by-timing.py - bin-packing script .config/nextest.toml - enables JUnit XML output for CI profile Each partition uploads its JUnit XML as an artifact (90-day retention). On subsequent runs, all partitions download this timing data and the script assigns tests to minimize the slowest partition duration. Uses --workspace-remap and --profile ci to ensure JUnit output is written correctly when running from a nextest archive. POC: inlines the nextest command to test this approach. Production implementation should integrate with stacks-network/actions.
72e3443 to
1e875c4
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.
What
Increase the number of parallel unit test partitions from 8 to 12 to reduce the worst-case partition execution time.
Why
Nextest's
--partition count:N/8distributes tests by position in the test list, not by execution time. This creates severe imbalance:The pipeline waits for the slowest partition, so this directly impacts wall-clock time. Increasing to 12 partitions distributes the heavy tests across more buckets.
The Change
In
.github/workflows/stacks-core-tests.yml:2 lines changed in 1 file.
Metrics to Track
Security Checklist
Part of CI Optimization Series
PR 4 of 7. Expected impact: ~8-10 min off critical path.