Repository navigation
perf(ci): each test shard collects only its own test files - #3810
Merged
Merged
Conversation
Owner
Author
|
Evidence for #2371. Premise (in the archived proposal, section Feasibility): Checks run on this branch (base
|
A shard passes the paths of its own test modules to pytest, so no xdist worker collects the whole suite. The modules go to the shards by lines of test code, heaviest first, with no stored data. The pytest-split dependency is removed. Plans: openspec/changes/2371-measure-and-cut-what-each-of
dan-petty
force-pushed
the
perf/2371-shard-own-test-files
branch
from
November 6, 2026 17:37
409d027 to
050c922
Compare
dan-petty
marked this pull request as ready for review
November 6, 2026 17:47
Owner
Author
|
Update after the first CI run (two failures, both from this change, both fixed):
The branch was rebased onto |
dan-petty
pushed a commit
that referenced
this pull request
Nov 6, 2026
🤖 I have created a release *beep* *boop* --- ## [0.70.2](v0.70.1...v0.70.2) (2026-11-06) ### Performance Improvements * **ci:** each test shard collects only its own test files ([#3810](#3810)) ([cc189ed](cc189ed)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
2 tasks done
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.
Each test shard now passes the paths of its own test files to pytest. Before,
pytest-splitchose the tests after collection, so each of the 16 xdist workers collected the whole suite and then dropped three quarters of it. That collection was 13.5% of the CPU time of a full run.The split is by lines of test code, heaviest file first, and it stores no data. A new test module joins a shard with no other step. The
pytest-splitdependency is removed.docs/TESTING.md,docs/SDLC.mdand theci-test-shardsspec say how the split works.Closes #2371
Change:
openspec/changes/archive/2026-11-06-2371-measure-and-cut-what-each-of/