Repository navigation
kind: install the shim beside the bring-up's other resources - #1393
Conversation
6a7e366 to
d55d216
Compare
d55d216 to
8fd279d
Compare
ac-pplx
left a comment
There was a problem hiding this comment.
The problem. Every Kind shard waits for the Tilt bring-up before it runs smoke. Two dependency edges left the bring-up idle. The shim install was a serial resource, so everything else queued behind it for about 20 s. The seed rootfs was built inside space-seed-publish's image build, which Tilt holds until the internal API is ready, so the seed finished last although its inputs existed about 100 s earlier.
Example (seconds from Tilt start, medians from the description):
before run 1 run 2
first API /healthz 104 68 79
seed Job completes 219 161 189
last pod transition 220 175 218 (run 2: the UI image is now last)
Verdict: approved; 1 thread to resolve before merge. The first bring-up's ordering holds. space-api still waits for the shim, the cluster controller (the other creator of sandbox pods) waits for space-api, and install-shim.sh never restarts containerd. A failed space-seed-build is reported by the bootstrap's failed-build check, which prints its log.
On timing: in this head's two runs, "Run the baseline Kind smoke" took a median of 3.1 and 3.8 minutes across the 12 shards. Seven other recent twelve-shard runs took 3.5-4.2 (median 4.1). The second run is inside that range, so the gain is real but small, as your "0-45 s" says.
Before merge (inline threads)
build-seed.shcan now run twice at once on the same output directory
Nit
- The second call is not free: the skip comes after
docker createand twodocker cpcalls (build-seed.sh:165-188). WithSPACE_SEED_REBUILD=1set in Tilt's environment, the rootfs is built twice (:190). Mention that in the comment, or clear the variable in the publish chain.
install-space-shim is a serial local resource, and Tilt runs nothing beside one: in the 2026-11-03 Kind CI timelines, Postgres, Redis and the Rust artifacts all queued about 22 s behind its 19 s, the start of every shard's bring-up. The Rust artifacts also listed it among the serial resources they wait for. It now runs in parallel, and the Rust artifacts no longer wait for it. space-api still depends on it, so the shim is on every sandbox worker before the first sandbox create; the cluster controller waits for space-api, and install-shim.sh does not restart containerd.
8fd279d to
403e29b
Compare
Summary
The Kind Tiltfile's
install-space-shimruns in parallel with the bring-up's other resources instead of holding them for 19 s at the start of every Kind shard's bring-up.Why.
install-space-shimis a serial local resource, and Tilt runs nothing beside one. In the bring-up timelines of 608 Kind CI shards from 2026-11-03, Postgres, Redis, the object store and the Rust artifacts all queued about 22 s behind it: the shim install ran from 22 to 41 s, and they started at 41.6 s. The Rust artifacts also list it among the serial resources they wait for (RUST_ARTIFACTS_AFTER).What changes.
install-space-shimhasallow_parallel = True.RUST_ARTIFACTS_AFTERno longer lists it, and the comment above it now says why.space-apistill depends on it, so the shim is on every sandbox worker before the first sandbox create. The cluster controller, the other creator of sandbox pods, waits forspace-api, andinstall-shim.shdoes not restart containerd.History. This PR also built the seed early. #1020 has since landed that, with
seed-artifactsand a lock inbuild-seed.sh, and runsprovision-local-consolein parallel, so this head keeps only the shim change. An earlier experiment that also madecheck-kind-node-imageandprovision-local-consoleparallel (run) started everything at once and slowed the bring-up through CPU contention, so the effect of starting work earlier is measured, not assumed.Validation
Kind CI on this head (run), against the nine successful Main CI runs since #1020 merged. The step is "Run the baseline Kind smoke", the bring-up and baseline check every shard runs before its typed smoke:
That is about 0.5 minutes less, below all nine main runs. It is one run, so the gain's size is approximate.
Severity and risk
Severity: does not apply; this is a CI and local bring-up speedup.
Risk:
docker execand copies onto the sandbox workers, now overlaps Postgres, Redis and the first image builds.AI assistance: Claude Code drafted the change and this description.
🤖 Generated with Claude Code