Skip to content

kind: install the shim beside the bring-up's other resources - #1393

Merged
zibi-pplx merged 1 commit into
mainfrom
zibi/kind-bringup-earlier
Nov 4, 2026
Merged

zibi-pplx merged 1 commit into
mainfrom
zibi/kind-bringup-earlier

Conversation

@zibi-pplx

@zibi-pplx zibi-pplx commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Kind Tiltfile's install-space-shim runs 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-shim is 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-shim has allow_parallel = True.
  • RUST_ARTIFACTS_AFTER no longer lists it, and the comment above it now says why.
  • space-api still 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 for space-api, and install-shim.sh does not restart containerd.

History. This PR also built the seed early. #1020 has since landed that, with seed-artifacts and a lock in build-seed.sh, and runs provision-local-console in parallel, so this head keeps only the shim change. An earlier experiment that also made check-kind-node-image and provision-local-console parallel (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:

Runs Median of shards Range across runs
Main since #1020 (9 runs) 3.47 min 3.14-3.83
this head (1 run) 2.91 min, slowest shard 3.30 —

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:

  • CPU contention. The shim install, about 19 s of docker exec and copies onto the sandbox workers, now overlaps Postgres, Redis and the first image builds.
  • Rollback. Revert this PR.

AI assistance: Claude Code drafted the change and this description.

🤖 Generated with Claude Code

@ac-pplx ac-pplx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

  1. build-seed.sh can now run twice at once on the same output directory

Nit

  • The second call is not free: the skip comes after docker create and two docker cp calls (build-seed.sh:165-188). With SPACE_SEED_REBUILD=1 set in Tilt's environment, the rootfs is built twice (:190). Mention that in the comment, or clear the variable in the publish chain.

Comment thread Tiltfile Resolved
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.
@zibi-pplx
zibi-pplx force-pushed the zibi/kind-bringup-earlier branch from 8fd279d to 403e29b Compare November 4, 2026 01:12
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

Tilt now allows install-space-shim to run in parallel. rust-artifacts no longer depends on it, and its other bootstrap dependencies remain unchanged.

Changes: Tilt resource scheduling

Layer / File(s) Summary
Update resource scheduling
Tiltfile
install-space-shim is marked parallel. rust-artifacts no longer depends on it, while its other listed bootstrap dependencies remain.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested labels: kind-smoke

Suggested reviewers: ac-pplx, johnlouie-pplx

Merge Risk: Minimal · up to 403e2

The scheduling change has no established merge-blocking regression.

Architecture risk: Low · up to 403e2

The change affects 1 system.

Changed systems: Tiltfile

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — Tiltfile (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in Tiltfile: install-space-shim is now marked parallel, so Tilt can run other resources while it executes.
  • observed — Modified behavior in Tiltfile: rust-artifacts no longer depends on install-space-shim; the updated comment identifies it as parallel while the listed serial bootstrap dependencies remain.
Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title is a conventional-commit style subject ("kind:" prefix) that names the change: the shim is installed alongside the bring-up's other resources. The diff makes install-space-shim parallel and …
Description check Passed The description is thorough and follows the template's main sections. Summary leads with the effect of merging and gives the reason with timeline data. Validation section is present but only says Kind…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title is a conventional-commit style subject ("kind:" prefix) that names the change: the shim is installed alongside the bring-up's other resources. The diff makes install-space-shim parallel and removes it from rust-artifacts' serial dependencies, which is the main change, so the title is related. However, it is somewhat indirect: the phrase "install the shim beside the bring-up's other resources" captures the intent but not the concrete effect (parallel execution and the dependency removal), and the description says the effect is a speedup. The title is specific enough for a teammate scanning history to understand the primary change.

Full details: Description check

Explanation

The description is thorough and follows the template's main sections. Summary leads with the effect of merging and gives the reason with timeline data. Validation section is present but only says Kind CI on this head will be compared and that numbers will be added later, so the validation is not yet filled in. Severity and risk section is complete: severity is stated as not applicable, and risk covers CPU contention and rollback by reverting the PR. The optional Rollout, Stack, and Not covered sections are not used, which is acceptable. The AI assistance line is filled in. The main gap is the missing validation results, which the template asks for at this head.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 4a0a3a9c-a04e-4c91-829c-ff63a5907a6c
Commits

Reviewing files that changed from the base of the PR and between 744e490 and 403e29b.

Files selected for processing: 1
  • Tiltfile

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.

@zibi-pplx zibi-pplx changed the title kind: start the seed build and the bring-up's resources earlier kind: install the shim beside the bring-up's other resources Nov 4, 2026
@zibi-pplx
zibi-pplx added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit bfc02a1 Nov 4, 2026
43 checks passed
@zibi-pplx
zibi-pplx deleted the zibi/kind-bringup-earlier branch November 4, 2026 01:34
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.

2 participants