ci(sentry): Shard sentry tests over 16 runners#8037
Merged
Conversation
Increase the sentry test matrix from 4 to 16 instances to reduce wall-clock time of the sentry job. The round-robin grouping is driven by the matrix instance count and MATRIX_INSTANCE_TOTAL, so both are bumped in lockstep. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/cg8C9Pe7N50McOUx8dm5I5EwAl24Tars1RrzsNzWFrE
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.
Increase the
sentryjob's test matrix from 4 to 16 instances to cut wall-clock time of the cross-repo sentry test run.Sharding is driven by round-robin grouping: the
setup-sentryaction reads the matrix instance and exportsTEST_GROUP/TOTAL_TEST_GROUPS, and sentry's pytest plugin keeps onlyhash(test) % TOTAL_TEST_GROUPS == TEST_GROUP. Both knobs are bumped in lockstep, as the inline comment requires.Tradeoff
Each shard pays a fixed setup cost (image load, sentry checkout, devservices, snuba migrations) regardless of test volume, so this trades ~4x runner-minutes for faster wall-clock and won't yield a full 4x speedup. Worth watching per-shard timing after merge to confirm 16 beats a smaller count like 8.
🤖 Generated with Claude Code
Agent transcript: https://claudescope.sentry.dev/share/yP9pFj3TliBk-_-vXWAKh7eHEAJil2TLbhmu92JgDVk