Skip to content

devcloud CI: shard the devcloud gate's container integration - #336

Merged
SSFSKIM merged 4 commits into
mainfrom
devcloud-ci-shards
Oct 22, 2026
Merged

SSFSKIM merged 4 commits into
mainfrom
devcloud-ci-shards

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Board ticket #113 (api board). The devcloud gate took about 8.5 min because its parts ran one after another. It is now split into four gates that run side by side: devcloud-unit, plus three integration parts. Each part builds the image on its own runner, because ci-kit gates hand nothing on.

  • devcloud/tests/run.sh takes DEVCLOUD_PART, following sminos's SMINOS_PART: unit, image, host, systemd. Unset, it runs everything, as before.
  • devcloud/tests/integration.py registers each case under the group of cases that share its container. PARTS maps parts to whole groups, balanced on measured times: image = the image check (104 s); host = the host container plus the one-shot boots; systemd = the systemd container plus the projects cases.
  • leaking_apply_is_scrubbed now greps for the token the stand-in currently serves. In the serial run, the host group had already rotated the original token out of the store before this case ran, so the case passed whatever the logs held.
  • The README and devcloud/CLAUDE.md name the new gates. The TECH-DEBT entry this resolves is removed.
  • There is no image cache. The Dockerfile's single RUN bind-mounts all of devcloud/, so any devcloud change rebuilds the only layer, and ci-kit run steps can't reach the GHA cache backend. See Residue.

Full account: docs/doperpowers/plans/2026-10-22-devcloud-ci-shards-report.md.

Per-part times (this PR's first green run)

Run 39704697659, all green. The PR touches .github/**, so every repo gate ran beside these four. Job time is GitHub's start-to-finish; build and integration come from the log timestamps.

gate job build integration cases
devcloud-unit 1m24s – – (75 s unit, 615 tests) –
devcloud-image 4m21s 144 s 96 s 3
devcloud-host 4m50s 164 s 108 s 29
devcloud-systemd 3m39s 122 s 88 s 11

The devcloud gate set's wall time is 4m50s, set by devcloud-host. The serial gate took 8m40s on main (run 39662033753) and 8m38s in the measurement run below. The parts ran 3 + 29 + 11 = 43 cases, the same 43 the unsharded run prints.

Validation Evidence

  • Wall time halved. Measurement run 39703626947 ran every gate side by side on one commit, including a throwaway unsharded gate (devcloud-all, not in this PR):

    gate job build integration
    devcloud-all (unsharded) 8m38s 148 s 289 s (+71 s unit)
    devcloud-unit 1m21s – – (70 s unit, 615 tests)
    devcloud-image 4m29s 150 s 104 s
    devcloud-host 4m30s 153 s 101 s
    devcloud-systemd 4m25s 148 s 101 s

    ci-gate printed: PASS devcloud-unit 1m21s, PASS devcloud-systemd 4m25s, PASS devcloud-image 4m29s, PASS devcloud-host 4m30s, PASS devcloud-all 8m38s, GREEN.

  • Every case runs exactly once. The unsharded gate printed 44 case lines and the three parts together printed 45. The difference is "the stand-ins start", setup that runs once in each part that boots containers. Without that line, the two lists hold the same 43 cases (sorted lists equal, no duplicate, no FAIL).

  • The unsharded run is unchanged. diff of its case sequence against main's reference run 39662033753 is empty.

  • Review: doperpowers:reviewer-medium on c331086..cc1c517 found nothing material (verdict: correct; it traced fixture commits, the secret rotation, built images and containers across parts).

Residue

  1. Split setup.sh's package layer out of the image's single RUN. Every devcloud change rebuilds the whole image, about 150 s in each of three gates. With a separate apt/toolchain layer, a cache could serve it. The catch: setup.sh is also the VM builder's recipe.
  2. ci-kit: a build cache for gates. run steps don't see ACTIONS_RUNTIME_TOKEN/ACTIONS_RESULTS_URL, so buildx --cache-from type=gha is unreachable. This needs a ci-kit option that exports them, or a registry-cache credential. It belongs in ci-kit's repo.
  3. The image scan sets the floor. image_is_clean takes 96 s, which, plus the build, bounds the image part. Scanning in parallel inside check_image would lower the gate set's wall time further.

Sminos-Session: devcloud setup#639ca648 (macbook on macbook)

devcloud/tests/run.sh takes DEVCLOUD_PART (unit, image, host, systemd;
unset runs everything, as before). integration.py registers each case
under the group of cases that share its container and runs the groups a
part names (PARTS), in definition order; with no part every case runs in
the order it always did. Each integration gate builds the image itself:
ci-kit gates hand nothing on.

The leak case now greps for the token the stand-in serves: after the host
group's rotation it was looking for a value no longer in the store.

Removes the TECH-DEBT entry this answers.

Sminos-Session: devcloud setup#639ca648 (macbook on macbook)
Sminos-Session: devcloud setup#639ca648 (macbook on macbook)
Sminos-Session: devcloud setup#639ca648 (macbook on macbook)
Sminos-Session: devcloud setup#639ca648 (macbook on macbook)
@SSFSKIM
SSFSKIM merged commit 646cb02 into main Oct 22, 2026
19 checks passed
@SSFSKIM
SSFSKIM deleted the devcloud-ci-shards branch October 22, 2026 01:43
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