Skip to content

fix(images): build against the resolved version, not latest - #108

Merged
bendwyer merged 1 commit into
mainfrom
consume-resolved-version
Sep 6, 2026
Merged

fix(images): build against the resolved version, not latest#108
bendwyer merged 1 commit into
mainfrom
consume-resolved-version

Conversation

@bendwyer

@bendwyer bendwyer commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Why

Eight Dockerfiles fetched latest themselves during the build, while the merge job separately resolved latest to compute the tag. Two resolutions, minutes apart, with nothing tying them together — so an upstream release landing between them tags an image with a version it does not contain.

bendwyer/github-workflows#194, already merged, resolves each version once in the changes job and passes it as a VERSION build-arg. This consumes it, so the artifact and its tag come from the same value.

What

The six that download a GitHub release asset move from releases/latest/download/ to releases/download/v${VERSION}/. Every one of these upstreams tags vX.Y.Z and get-version.sh already strips the v, so v${VERSION} reconstructs the tag exactly — verified against all six before rewriting the URLs.

The two npm images pin the package spec instead: npm install <pkg>@${VERSION}.

flux-mcp, paperless-mcp and terraform-mcp also drop jq, since they no longer query the API themselves.

Untouched: comictagger (already derives its tag from the pip pin, #106), kobo-book-downloader (#107), and the four first-party images whose version is a literal.

Verification

All eight build against their resolved version:

image VERSION result
ansible-mcp 26.6.0 builds
context7-mcp 4.0.5 builds
flux-mcp 0.59.0 builds
github-mcp 1.12.0 builds
grafana-mcp 1.3.0 builds
humble-cli 0.23.2 builds
paperless-mcp 0.5.0 builds
terraform-mcp 1.3.0 builds

The installed version matches the arg rather than latest — ansible-mcp reports 26.6.0, context7-mcp 4.0.5, terraform-mcp 1.3.0 from its own --version.

And the pin is load-bearing: --build-arg VERSION=99.99.99 fails the build for terraform-mcp and github-mcp rather than falling back to latest. Without that check this change would look correct while doing nothing.

humble-cli --version prints dev, which is upstream's own build stamp, so that one is confirmed by the download URL rather than by the binary.

Note

The four first-party images now receive a VERSION build-arg they do not consume, which logs an unconsumed build-arg warning. Harmless, and preferable to adding a no-op ARG to each just to silence it.

🤖 Generated with Claude Code

Eight Dockerfiles fetched "latest" themselves while the merge job separately
resolved "latest" to compute the tag. Two resolutions, minutes apart, with
nothing tying them together: an upstream release landing between them tags an
image with a version it does not contain.

bendwyer/github-workflows#194 now resolves once and passes VERSION as a
build-arg. These consume it, so the artifact and its tag come from the same
value.

The six that download a GitHub release asset move from releases/latest to
releases/download/v${VERSION}, since every one of these upstreams tags
vX.Y.Z and get-version.sh already strips the v. The two npm images pin the
package spec instead. flux-mcp, paperless-mcp and terraform-mcp no longer
need jq, having stopped querying the API themselves.

Verified all eight build against their resolved version, that the installed
version matches the arg rather than latest (ansible-mcp 26.6.0, context7-mcp
4.0.5, terraform-mcp 1.3.0), and that a wrong VERSION now fails the build
instead of silently falling back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@bendwyer
bendwyer merged commit 258ef10 into main Sep 6, 2026
20 checks passed
@bendwyer
bendwyer deleted the consume-resolved-version branch September 6, 2026 15:25
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.

1 participant