Repository navigation
ci(backend): Bump backend test shards to 30 - #129077
Merged
Merged
Conversation
joshuarli
marked this pull request as ready for review
October 28, 2026 21:55
Increase MAX_SHARDS from 22 to 30 to reduce per-shard runtime on full backend runs.
Merge per-shard test-durations.json artifacts from run 40755937953 (all 30 shards green). Old weights overestimated total test time 1.7x (25551s vs 14887s actual) and missed files like test_pagination.py, producing a 294-715s actual spread against 860s predictions. Fresh weights balance to 504s predicted per general shard; shard 0 predicts 480s, exactly matching actual.
test_organization_agent_token.py held 1680 collected tests (runtime-generated matrix) and test_transactions_rebalancing.py 679 (module-global parametrize), each landing whole or striped across shards and wrecking balance. Split into per-theme files with identical collected totals (1680 = 30+15+1635, 679 = 504+168+6+1, verified by collect-only). Shared matrix/param infrastructure is imported from the kept originals, following existing cross-test import precedent. Seed durations for the new files by splitting the measured per-file seconds proportionally to collected tests, so the next full run plans balanced immediately.
joshuarli
force-pushed
the
ci/bump-backend-shards-30
branch
from
October 28, 2026 22:04
74627af to
a3fa088
Compare
mchen-sentry
approved these changes
Oct 28, 2026
mchen-sentry
left a comment
Member
There was a problem hiding this comment.
Should be fine, but can we explain why we're splitting the files when there's a planner that breaks them apart already?
This reverts commit a3fa088.
Contributor
Backend Test FailuresFailures on
|
Member
Author
i've walked it back; it didn't make a difference and was cherry picked from an older experiment of mine |
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.
i've spent some effort getting the per-shard overhead down as much as humanly possible
with that, i'm comfortable sharding out more now
backend shards 22 -> 30 gets us ~25% faster on the full suite
will followup with adjusting selective testing to rightsize
Increase backend test shards from 22 to 30 and fix the shard balance data.