fix(docker): reference FRONTEND_CACHE_BUST so the frontend clone actually busts cache - #172
Merged
Conversation
…ally busts cache The Dockerfile declared FRONTEND_CACHE_BUST but never referenced it, so BuildKit kept the 'git clone --branch main' layer cached across builds and baked a stale frontend. Reference the arg in the clone RUN so a changed value forces a fresh clone, and pass FRONTEND_CACHE_BUST in release.yml's docker build (ci.yml already passes it).
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.
The Dockerfile declared
ARG FRONTEND_CACHE_BUSTbut the frontendgit clone --branch mainlayer never referenced it. In BuildKit an arg only invalidates a layer when that layer uses it, so the clone stayed cache-hit across builds and baked a stale frontend — meaning frontend-only changes never actually shipped in a new image (andci.yml's existingFRONTEND_CACHE_BUSTarg was a no-op).Dockerfile: reference$FRONTEND_CACHE_BUSTin the cloneRUNso a changed value forces a fresh clone.release.yml: passFRONTEND_CACHE_BUST=${{ github.run_id }}in the docker build-args (ci.yml already does).No version bump (releases are manual-dispatch). Merging this triggers
ci.ymlto rebuild the image (:sha-<sha>+:latest) with the current frontend main.