Commit ae30abe
authored
ci(viewer): shard by a hash of the path, so membership is stable (#3068)
Raised by a reviewer, and it breaks something I built plus a piece of
evidence I used.
I sharded with `awk 'NR % n == s'` over the sorted file list, so shard
membership depends on a file's INDEX. Adding or removing any test file
shifts every file after it. Measured on the real tree: adding one file
reassigned 534 of 534. Hashing the path instead reassigns 0 of 534.
Two consequences, and the second is the one that caught me.
A flaky file wanders between shards, so "shard 2 is the slow one" or "the
flake lives in shard 1" decays with every added test.
And cross-PR comparison is invalid. While chasing the
useSandbox.runSupersession flake I argued that #3038's shard 1 passing on
the same base showed #3027's shard-1 failure was unrelated. Different PRs,
different file counts, different shard composition, so that is not the same
set of files and the argument does not carry. The conclusion still stands on
the rest of the evidence (neither diff can reach that test, it passes
locally 3 of 3, five PRs hit it under concurrency 4), but I stated an
invalid argument as proof and it should not have been in the pile.
Partition verified exact rather than assumed: 124+147+127+136 = 534 files,
534 distinct paths across the four shards, and with no env set the script
still selects all 534, so a local `pnpm test` is unchanged.1 parent efcbd96 commit ae30abe
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
376 | 385 | | |
377 | 386 | | |
378 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments