Skip to content

ci: shard 1 carries more, so give it more - #83

Merged
jeremie0342 merged 1 commit into
masterfrom
ci/shard-one-carries-more
Aug 21, 2026
Merged

ci: shard 1 carries more, so give it more#83
jeremie0342 merged 1 commit into
masterfrom
ci/shard-one-carries-more

Conversation

@jeremie0342

Copy link
Copy Markdown
Collaborator

The master run after #82 reported failure with seven shards green and shard 1 cancelled. Every step in shard 1 succeeded — tests included, and the cache was written — but the job was killed by the 45-minute timeout eleven minutes after the last useful work, and the aggregate turned that into a red run.

Why shard 1 is different

It is not one of eight equal jobs. It runs the doctests, and it is the single writer for the shared build cache, so on a cache miss it pays an upload the other seven skip.

Measured on that run, where the Cargo.lock change from the dependency bumps guaranteed a miss:

step duration
setup, services, toolchain ~4 min
tests (cold cache, full compile) ~33 min
doctests ~20 s
save cargo + target cache ~16 min (shard 1 only)
total ~53 min

Against a budget of 45.

The fix

timeout-minutes: ${{ matrix.shard == 1 && 75 || 45 }}.

Not a blanket raise. The other seven finish inside 45, and keeping their ceiling low is what makes a genuine hang visible. Only the shard that does the extra work gets the extra room.

Note

The cache is warm now, so the next run skips the save either way — which is precisely why this would have gone unnoticed until the next dependency bump.

The master run after the merge reported failure with seven shards green and
shard 1 `cancelled`. Every step in shard 1 succeeded, including the tests and
the cache write — it was killed by the 45-minute timeout eleven minutes after
the last useful work, and the aggregate turned that into a red run.

Shard 1 is not one of eight equal jobs. It runs the doctests, and it is the
single writer for the shared build cache, so on a cache miss it pays an upload
the other seven skip. Measured on that run, where the Cargo.lock change from
the dependency bumps guaranteed a miss: 4 min of setup, 33 min of tests on a
cold cache, 20 s of doctests, and 16 min saving the cache. Fifty-three against
a budget of forty-five.

The budget was mine, and the comment above it said a timeout should catch a
hang rather than a slow week. It did the second, because I sized it from the
average shard rather than from the one it also applies to.

Not a blanket raise: the other seven finish inside 45 and keeping their
ceiling low is what makes a genuine hang visible. Only shard 1 gets the room
its extra work needs.

The cache is warm now, so the next run skips the save either way — which is
precisely why this would have gone unnoticed until the next dependency bump.
@jeremie0342
jeremie0342 merged commit d1c5344 into master Aug 21, 2026
26 checks passed
@jeremie0342
jeremie0342 deleted the ci/shard-one-carries-more branch August 21, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant