Repository navigation
ci(image): Hand the production build cache over locally - #730
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
The production job builds the image four times (two registries, two variants). The first build exported every layer to the GitHub Actions cache (~90s) so the next three could reuse it, but nothing in that cache helps the next commit: the builder stage starts with `COPY . .`, and in the run I checked no step of the first build was cached. Write the first build's cache to the runner's disk instead and have the other three builds read it from there. Bump action-build-and-push-images to 3714f35, which provides the cache_from/cache_to inputs and skips QEMU for these native amd64 builds. Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
joshuarli
approved these changes
Oct 13, 2026
joshuarli
marked this pull request as ready for review
October 13, 2026 21:25
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.
GoCD deploys wait on
test-vroomandBuild and push production images. On recent main commits the image job took 4–10 min, versus 1–3 min fortest-vroom, so it sets the pace for deploys.Why: the job builds the image four times (two registries × default/distroless). Each call starts a fresh builder and sets up QEMU. The first call also exports every layer to the GitHub Actions cache: ~90s of a ~3m step in the run I checked. That export only helps the other three calls in the same job. It's useless for the next commit, because the builder stage starts with
COPY . .. In that run, not a single step of the first build came from the cache, apt layer included.Changes (
.github/workflows/image.yaml,build-productiononly)${{ runner.temp }}/vroom-buildcacheon the runner's disk instead of GitHub's cache, and reads no cache.action-build-and-push-imagesfromdd9b907to3714f35. This adds thecache_from/cache_toinputs and skips QEMU for these native amd64 builds. The bump also brings the shell-injection fix and theimage-mirrorQEMU/BuildKit images.Expected: a smaller win than the other PRs in this batch, roughly 1–2 min per main commit, from dropping the upload to GitHub's cache and four QEMU setups. It also frees the ~6 GB of
buildkit-blob-*entries this job keeps in the Actions cache.Verified:
actionlintpasses, andzizmorreports the same findings as before. This job only runs on main, so it hasn't run with these changes yet. The first main run after merge is the real test. The 10 min outlier in my sample has some other cause I didn't find.via @joshuarli.
--
View Junior Session [Sentry]