Balance Windows Bazel test shards using duration estimates (#49103) · zimushui/code@7e049b3 · GitHub
Skip to content

Commit 7e049b3

Browse files
jgershen-oaicopyberry
authored andcommitted
Balance Windows Bazel test shards using duration estimates (openai#49103)
## Why Hash-based sharding does not account for differences in test duration. Use estimated test time to balance the Windows Bazel workload across shards. ## What changed - Add checked-in duration weights and a deterministic selector that assigns the longest targets first to the least-loaded shard. - Assign every queried target exactly once, default missing weights to one second, and ignore stale weights. - Run queries and selection in the foreground so failures stop the job before tests run with a partial target list. - Emit LF-delimited target labels for Git Bash and report estimated shard loads on stderr. ## Testing Add seven passing selector tests covering deterministic coverage and balancing, missing and stale weights, invalid inputs, duration-file overrides, and CLI output. Run them on the first Windows CI shard. GitOrigin-RevId: d415ae093bfe57794ee53a2eb9d712022202dad8
1 parent c2d2f42 commit 7e049b3

4 files changed

Lines changed: 521 additions & 23 deletions

File tree

Lines changed: 103 additions & 0 deletions
Lines changed: 147 additions & 0 deletions

0 commit comments

Comments
 (0)