Repository navigation
perf(component-build): keep cache mounts out of the checkout, save them every S3 build - #402
Merged
Merged
Conversation
JesperTerkelsen
marked this pull request as ready for review
November 14, 2026 21:30
JesperTerkelsen
requested review from
sudheer-monta
and removed request for
a team
November 14, 2026 21:30
joscdk
approved these changes
Nov 15, 2026
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.
Intent
ARC image builds restore the Dockerfile cache mounts into the checkout, so any repo whose Dockerfile does
COPY . .without a.dockerignoreships the whole cache as build context (1.8 GB for infra-portal, see this 13-minute deploy). This restores them into the runner's temp dir instead, and on the S3 backend saves them every build so the compile cache stays fresh.Decisions: S3 builds now save ~1 GB of cache on every build
go buildtook ~130 s with the stale cache against ~11 s with a fresh one (not discussed).actions/cachebackend keeps the lockfile-only key, since per-commit saves would churn GitHub's 10 GB cache quota..dockerignore(monta-app/infra-portal#1501); this fixes every other caller without one.Verified: actionlint passes; warm-cache Go build 11 s vs 130 s in CI
actionlintoncomponent-build.ymlpasses.go buildin 11.1 s; the CI run with the cache last saved on 2026-10-30 (lastgo.sumchange) took 129.6 s.Gaps
go buildand a Post step that extracts and uploads the caches. Watch that Post step's time against the saved compile time.monta-github-ci-cachebucket; I didn't check its lifecycle rule.@mainon their next build; cache entries saved before it stay valid, since the restore keys still match them.Thermo-nuclear review: 1 finding, 1 fixed
Review of
6309491component-build.yml:160: a second restore key repeating the lockfile hash, which the prefix key already covers (newest match wins)6309491.scratch-dirmoves torunner.tempwith the cache dir, so cache-dance's extract can stillrenamethe scratch copy into place on the same filesystem.