Skip to content

Buildkit cache and comment sweep - #7

Merged
aledbf merged 2 commits into
mainfrom
buildkit-cache-and-comment-sweep
Sep 16, 2026
Merged

aledbf merged 2 commits into
mainfrom
buildkit-cache-and-comment-sweep

Conversation

@aledbf

@aledbf aledbf commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

aledbf and others added 2 commits September 15, 2026 22:25
… scope

Two faults, either of which alone makes every CI run a cold build.

The first is that nothing was ever stored. BuildKit authenticates to GitHub's
cache service with $ACTIONS_RUNTIME_TOKEN and $ACTIONS_RESULTS_URL, and those
reach JavaScript actions, not `run:` steps. Every build here goes through `task`,
which is a `run:` step, so each --cache-to type=gha was accepted, stored nothing,
and said nothing. It is invisible in a log; where it shows is the cache itself,
which held one entry — setup-go's 14 MiB — for a repository that compiles QEMU
and a kernel. crazy-max/ghaction-github-runtime exposes the variables, and
Docker's documentation names it for exactly this.

The second would have bitten the moment the first was fixed. `type=gha` defaults
to the scope `buildkit`, and per Docker's documentation, "each build will
overwrite the cache of the previous, leaving only the final cache." The release
job runs four builds in one job, so QEMU, the kernel, e2fsprogs and the image
each destroyed the last one's cache and missed on the next run.

So the scopes are named, and named in Taskfile.yml rather than in the workflows:
they have to match between the per-artefact lanes and the release, or a release
starts cold on work main already paid for. CI now sets CACHE_BACKEND=gha and
nothing else; a developer still gets the local directory, byte for byte as
before. The QEMU runtime image reads scope=qemu to reuse the builder stage and
writes only its own.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A comment that narrates this repository's own past — "this used to be X", "it did
not work before <date>" — is answerable by git, and it is the half of a comment
that rots. What earns its place is the dead end someone would otherwise walk into
again, and the measurement that settles it.

So the rule applied here is: keep the trap and the number, drop the history.
"It used to be turned off here, on the grounds that..." becomes "Turning it off
here is the tempting change, on the grounds that..." — and every measurement
stays: nohz=off still carries its 1.7% of a core and its 821-853 ms, pahole 1.24
still explains why the kernel toolchain cannot go back to bookworm, and the
missing journal still produces "structure needs cleaning" on a copy taken seconds
after a grow.

Two paragraphs are deleted rather than rewritten, both in optimize-systemd.sh.
They were commentary on an earlier revision of the comment above them, and
nothing outlives the deletion.

The open problem in spin-machine-console.service is untouched, only put in the
present tense: the reason that unit exists no longer holds, and the hole it
leaves is still the thing to close.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@aledbf
aledbf merged commit c35d424 into main Sep 16, 2026
4 checks passed
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