Repository navigation
Conversation
ac-pplx
left a comment
There was a problem hiding this comment.
Each Kind CI shard runs its ECW scenarios and then its native ones, as two processes, and until now each pass was split across the shards on its own. A shard could therefore draw a heavy share of both, and the slowest shard sets the required check's wall time. This PR splits the (surface, scenario) pairs of both passes together and goes from six shards to eight.
shard 1 at eight shards, by the duration hints
each pass split alone split together (this PR)
ECW pass brownout 457 s + others brownout 457 s only
native pass its own eighth of native 2 scenarios, 5 s
total 592 s (9.9 min) 462 s (7.7 min)
At this head (run) every (surface, scenario) pair ran exactly once (124 of 124), and the slowest typed shard took 9.1 min. Across ten recent six-shard PR runs whose shards did not wait for the producer, the median was 10.65 min.
Verdict: Approved; 2 threads to resolve before merge.
Before merge (inline threads)
- A shard whose share of one surface is empty now fails
- Neither new test fails if the joint split is removed
Follow-ups
- Main pushes now ask for ten concurrent 16-core runners: the producer, eight shards and
kind_rust_state. In the 13 green main runs since six shards merged, shards waited up to 1.9 min for a runner. Measure main's shard queue after merge, as the README asks (infra/space/kind/README.md:276-281).
Nits
- The Validation table and runner-minute figures come from earlier heads stacked on #1266, which has since closed and is not in this stack. At this head, the slowest typed shard took 9.1 min and the shard jobs summed to 132.7 runner-minutes. At #1268's head (run) they were 8.3 min and 124.7. Five eight-shard attempts took 8.1-10.9 min (median 8.4) and 124.6-133.1 runner-minutes. Ten six-shard PR runs that did not wait for the producer took 10.4-11.7 min (median 10.65) and 106.4 runner-minutes at the median. That is about 2.2 minutes saved at about +20% runner time, rather than 2.7 minutes at +15%.
infra/space/kind/README.md:292still says ID/index tie-breaking; equal hints now order by surface, then ID.
|
Thanks for the review. Both inline threads are fixed in f3625fc. On the rest:
|
d67749a to
7babab1
Compare
…th API surfaces Each shard runs its ECW scenarios and then its native ones, but each pass was partitioned on its own, so a shard's two loads did not add up evenly: by the duration hints, eight such shards would range from 7.3 to 9.9 minutes. A sharded --all pass now partitions both surfaces' eligible scenarios together, from the same registry and filters, and runs its own surface's share; every pass computes the same partition, so each (surface, scenario) pair still runs exactly once. By the hints, eight shards then carry 7.7 minutes each, which is about the leader-election brownout's own length, so a ninth would not help. The cost is two more 16-core runners per Kind run. The joint partition need not give a shard work on both surfaces: a long scenario can fill a shard by itself. A pass whose share is empty while the shard's other pass has work says so and exits 0 without a bootstrap; a shard with nothing on either surface still fails. Also bump pulldown-cmark, which prost-build pulls in, from 0.13.5 to 0.13.6 for RUSTSEC-2026-0433, so cargo deny's advisory check passes again, and carry its cargo-vet exemption forward to the new version, as earlier advisory bumps did. That is not an independent audit.
Summary
The typed Kind smoke now runs on eight shards instead of six. The ECW and native passes are partitioned together, so each shard carries one even load.
Why. After the earlier Kind CI work, the slowest typed shard (about 10.8 min) is the largest part of a Kind PR's roughly 20-minute required check. Each shard runs its ECW scenarios and then its native ones, but each pass was partitioned on its own, so a shard's two loads did not add up evenly. By the duration hints, eight shards partitioned per surface would range from 7.3 to 9.9 minutes.
What changes.
select_shardtakes an optionalinventories: the eligible scenarios of every API surface a sharded--allrun covers (JOINT_SURFACES, ECW then native, asscripts/tests/smoke-kind-typed.shruns them).By the hints, eight shards then carry 7.7 minutes each. That is about the leader-election brownout's own length, so a ninth shard would not lower the slowest.
The Kind matrix runs shards 1-8, and the job name,
SMOKE_SHARDand the Kind README follow.A pass whose share of the joint partition is empty, while the shard's other pass has work, says so and exits 0 without a bootstrap. A long scenario can fill a shard by itself: at nine shards, the brownout's shard has no native scenario. A shard with nothing on either surface still fails.
Cargo.lockbumpspulldown-cmark, whichprost-buildpulls in, from 0.13.5 to 0.13.6 for RUSTSEC-2026-0433. The advisory was published today and fails the Rust dependency check (cargo deny) on every PR until the lockfile moves. Only that entry and its checksum change; the checksum matches the crates.io index.supply-chain/config.tomlcarries the existingsafe-to-deployexemption forward from 0.13.5 to 0.13.6, as earlier advisory bumps did (build: update zstd dependencies for published advisories #972, build: update Tokio and ctutils for security advisories #901), with a note that this is not an independent audit.Value. The slowest typed shard drops from a median of 10.65 to about 8.4 minutes, so the required check is about 2.2 minutes shorter on every Kind PR.
Stack
Validation
space_smoke/tests/test_sharding.py:select_shardignoresinventories.space_smoketests pass on macOS; the ECW port-forward test fails there on main too (wc -cpadding).cargo metadata --lockedresolves with the bumped lockfile; the dependency check runs in CI.The slowest typed shard and summed shard job time, against six-shard PR runs whose shards did not wait for the producer:
That is about 2.2 minutes saved for about 20% more runner time. In the 10.9-minute shard,
local.reconcile_queue_gc_prunes_only_gone_nodestook 300 s against its 132 s hint. It waits for a GC tick of up to 300 s, so it varies from about 26 to 300 s. With eight tightly balanced shards, such a scenario sets the tail when it runs long; see Not covered.Severity and risk
Severity: does not apply; this is a CI speedup.
Risk:
kind_rust_state. The runner's limit is 150. Each shard repeats the cluster setup, so Kind runner time rises by about 20% (Validation). In main runs since six shards merged, shards waited up to 1.9 min for a runner; measure main's shard queue after this merges, as the Kind README asks.Not covered
local.reconcile_queue_gc_prunes_only_gone_nodeswaits for a GC tick of up to 300 s. Hinting it at its slow end, or shortening the tick through a test hook as the brownout's budget was, would keep it from setting the tail.AI assistance: Claude Code drafted the change, its tests and this description.
🤖 Generated with Claude Code