Repository navigation
Stabilize randomized Bazel shards - #3224
Open
mattyclarkson wants to merge 1 commit into
Open
mattyclarkson wants to merge 1 commit into
mattyclarkson wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## devel #3224 +/- ##
==========================================
- Coverage 91.18% 91.16% -0.02%
==========================================
Files 205 205
Lines 9101 9103 +2
==========================================
Hits 8298 8298
- Misses 803 805 +2 🚀 New features to boost your workflow:
|
horenmar
requested changes
Oct 23, 2026
horenmar
left a comment
Member
There was a problem hiding this comment.
No. Move the check downwards and account for cases where the RNG seed is properly set.
Catch2 defaults to randomized test order, but Bazel does not set TEST_RANDOM_SEED for ordinary sharding. Independent shard processes can therefore select overlapping cases and omit others. When Bazel enables multiple shards, use declaration order only if the requested order is randomized. Preserve --order=decl and --order=lex, which already have stable membership, and leave non-sharded runs unchanged. Explicitly seeded random order is also replaced by this fallback.
mattyclarkson
force-pushed
the
bazel-stable-shards
branch
from
October 26, 2026 14:12
5f768cf to
58a415e
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.
Description
Catch2 defaults to randomized test order, but Bazel does not set TEST_RANDOM_SEED for ordinary sharding. Independent shard processes can therefore select overlapping cases and omit others.
When Bazel enables multiple shards, use declaration order only if the requested order is randomized. Preserve --order=decl and --order=lex, which already have stable membership, and leave non-sharded runs unchanged. Explicitly seeded random order is also replaced by this fallback.
GitHub Issues
None.