Repository navigation
fix(build): key the Dockerfile cache mounts on lockfiles, not only Gradle files - #369
Merged
Merged
Conversation
…adle files For Node and Python images the key had no hash at all, so the first saved cache was restored as an exact hit forever and never refreshed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
joscdk
approved these changes
Oct 1, 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.
What?
Adds the common lockfiles to the hash in the Dockerfile cache-mount key in
component-build.yml:package-lock.json,pnpm-lock.yaml,yarn.lock,bun.lock(b),requirements*.txt,poetry.lock,uv.lock,go.sumandCargo.lock, next to the Gradle files.Why?
The key only hashed Gradle files. For the non-Kotlin images now building on ARC (#367), the hash was empty, e.g.
buildkit-cache-mounts-Dockerfile-in project-tracker's first ARC build. The first saved cache would then be an exact hit on every later build and never get refreshed, so a cached pnpm or pip store would go stale as dependencies change. With the lockfiles in the key, a dependency change gives a new key, the prefix restore-key still warms the build, and the new cache is saved.nojira
🤖 Generated with Claude Code