Skip to content

fix(build): key the Dockerfile cache mounts on lockfiles, not only Gradle files - #369

Merged
JesperTerkelsen merged 1 commit into
mainfrom
fix/cache-mount-key-lockfiles
Oct 1, 2026
Merged

JesperTerkelsen merged 1 commit into
mainfrom
fix/cache-mount-key-lockfiles

Conversation

@JesperTerkelsen

Copy link
Copy Markdown
Member

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.sum and Cargo.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

…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>
@JesperTerkelsen
JesperTerkelsen marked this pull request as ready for review October 1, 2026 08:05
@JesperTerkelsen
JesperTerkelsen requested a review from a team as a code owner October 1, 2026 08:05
@JesperTerkelsen
JesperTerkelsen requested review from gh05tdog and removed request for a team October 1, 2026 08:05
@JesperTerkelsen
JesperTerkelsen merged commit 031e3f3 into main Oct 1, 2026
1 check passed
@JesperTerkelsen
JesperTerkelsen deleted the fix/cache-mount-key-lockfiles branch October 1, 2026 08:06
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.

2 participants