Repository navigation
ci: rebalance test shards 4→6 to cut wall-clock - #279
Conversation
The 45 test projects were split across 4 shards; shard 0 ran 24m while shard 1 ran 10m — everyone waited on the outlier. Raising SHARD_TOTAL 4→6 spreads the ~38 light projects over 6 shards instead of 4 (the extra light projects that padded shard 0 move off it), while the heavy/light dual-counter still keeps the 3 ALC-heaviest (AI/FutuRe/Orleans) on distinct shards and only one shard doubles up (Acme+Orleans). Wall-clock ≈ build (~10m) + slowest shard, so cutting the long pole cuts the run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR reduces CI wall-clock time for the .NET test workflow by increasing the number of parallel test shards, improving distribution of light test projects while preserving the existing heavy/light weighted sharding strategy.
Changes:
- Increased the test job matrix from 4 shards to 6 shards (
shard: [0..5]). - Updated
SHARD_TOTALfrom4to6so the bash sharding logic assigns projects across 6 runners. - Updated inline workflow comments/diagram to reflect the new shard count and rationale.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results (shard 2)696 tests - 416 694 ✅ - 417 1m 48s ⏱️ - 4m 48s Results for commit 3c02d31. ± Comparison against base commit c3d15ed. This pull request removes 463 and adds 47 tests. Note that renamed tests count towards both. |
Test Results (shard 3)788 tests - 951 788 ✅ - 950 3m 25s ⏱️ - 3m 31s Results for commit 3c02d31. ± Comparison against base commit c3d15ed. This pull request removes 1067 and adds 116 tests. Note that renamed tests count towards both. |
Test Results (shard 1)1 029 tests +88 1 028 ✅ +267 3m 29s ⏱️ - 1m 1s Results for commit 3c02d31. ± Comparison against base commit c3d15ed. This pull request removes 843 and adds 931 tests. Note that renamed tests count towards both.This pull request removes 180 skipped tests and adds 1 skipped test. Note that renamed tests count towards both. |
Test Results (shard 4) 10 files 10 suites 4m 30s ⏱️ Results for commit 3c02d31. |
Test Results (shard 5)862 tests 682 ✅ 4m 14s ⏱️ Results for commit 3c02d31. |
Test Results (shard 0) 10 files - 5 10 suites - 5 4m 56s ⏱️ +38s Results for commit 3c02d31. ± Comparison against base commit c3d15ed. This pull request removes 1051 and adds 138 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Test Results 56 files ±0 56 suites ±0 22m 25s ⏱️ +3s Results for commit 3c02d31. ± Comparison against base commit c3d15ed. This pull request removes 9 tests.♻️ This comment has been updated with latest results. |
What
Raises
SHARD_TOTAL4 → 6 indotnet-test.yml(matrix + env).Why
From a real run: the 45 test projects split across 4 shards left shard 0 at 24m while shard 1 ran 10m — the whole run waits on the outlier (wall-clock ≈ build ~10m + slowest shard ≈ 34m). Spreading the ~38 light projects over 6 shards instead of 4 moves the extra light projects off the long-pole shard.
The existing heavy/light dual-counter balancing is preserved: at 6 shards the 7 heavies still spread ≤2/shard, the 3 ALC-heaviest (AI/FutuRe/Orleans) still land on distinct shards, and only one shard doubles up (Acme+Orleans). Tests stay serial within a shard (
maxParallelThreads:1— required for correctness), so more shards is the right lever.The collector job fans in via
testResults-shard*glob +needs: test, so it adapts to 6 shards with no change.🤖 Generated with Claude Code
EOF