Repository navigation
CI: release binaries built with kache and copied into the images; BuildKit's cache in R2 - #169
Merged
Merged
Conversation
…es; BuildKit's cache in R2; images build on pull requests release-bins builds the app's and the renderer's release binaries with the compile cache in rust:1.99.1-trixie (the Dockerfiles' image, so the same glibc as the runtime images), in parallel with the tests. images passes them to docker build as the named context `bin`, which replaces the Dockerfiles' new `bin` stage, so cargo doesn't run in docker. A dependency change no longer rebuilds every dependency (cargo-chef's single layer). BuildKit's layer cache moves from the GitHub Actions cache (over its 10 GB limit) to the kache bucket under buildkit/. Pull requests build the images without pushing, so a broken image fails there instead of in main's deploy.
ndbroadbent
force-pushed
the
ci/images-prebuilt-bins
branch
from
December 4, 2026 04:45
2a18d3a to
0dfdf3f
Compare
VisualCIdocspring/visualci · build #381 · 392 unchanged · no changes This PR vs base: 1 changed since #365, across 3 builds docspring/visualci · journeys · build #378 · 12 changed, 18 unchanged · approved by visualci coordinator agent (MCP) for Nathan Broadbent
This PR vs base: nothing since #362, across 3 builds
Updated as builds change. Agents can review with VisualCI's MCP tools. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
imageswas the long tail on main: up to 12.8 min before a deploy. In run 47251755025 a dependency change madecargo chef cookrebuild every dependency (282 s; cargo-chef caches all of them as one layer), then the app (107 s) and the renderer (104 s). And BuildKit'stype=ghacache sits in a GitHub Actions cache that is over its 10 GB limit (10.6 GB, 251 entries), so GitHub evicts entries.Changes
release-bins(new): builds the app's and the renderer's release binaries with kache (manifest keyvisualci-release, the shared docspring-kache bucket; main writes, PRs read) inrust:1.99.1-trixie. That's the Dockerfiles' own image, so the binaries have the same glibc as thedebian:trixie-slimruntime images. It starts with the run, in parallel with the tests. App and renderer are built in separate cargo invocations, as the Dockerfiles build them, so features don't unify.FROM scratch AS binstage holds the binary the runtime image copies. CI passes--build-context bin=tmp/bin, which replaces that stage, so the Rust stages don't run in docker. A plaindocker buildstill compiles everything as before.type=ghatotype=s3in the kache bucket underbuildkit/(ignore-erroron writes, so a cache problem never fails a deploy). Read-write key on main (thekache-writeenvironment), read-only on PRs.imagesruns on pull requests too, building without pushing or logging in, so a change that breaks an image fails its PR instead of main's deploy. The repo is public, so these minutes are free.deployandsitestay main-only.Expected
A dependency change recompiles only the crates that changed, not all of them, and a commit that only touches app code recompiles only the app's crates. Main's deploy no longer waits on cargo inside docker. The numbers from main and PR runs go here once there are a few. This PR's own first run is cold: PRs can't write the cache, and main hasn't built
visualci-releaseyet.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.