20260816 - Resolve the telemetry image tag when building the artifact - #31
Merged
Merged
Conversation
Adding retina-telemetry to docker-compose.yml was not enough to ship it. The
artifact build resolves image tags with one hand-written sed clause per
variable, and TELEMETRY_V had none — so the generated manifest kept a literal
image: ghcr.io/offworldlabs/retina-telemetry:${TELEMETRY_V:-v0.1.0}
which is exactly what the comment above that block warns about:
gen_docker-compose extracts image names with raw sed and cannot handle
unresolved shell variables. skopeo would receive `${TELEMETRY_V:-v0.1.0}` as a
tag, and the release either fails there or produces an artifact whose telemetry
service can never start on a node.
Nothing caught it. The compose file is valid, `docker compose config` resolves
the variable correctly, and the same block ran on two live nodes — because the
defect is not in the compose file but in a transformation of it that enumerates
its variables by hand, in another file, with no test.
So this adds the seventh clause and then removes the need to remember an
eighth: every image line in the generated manifest is asserted to be a literal,
and the build fails naming the variable that was missed. A missing clause now
costs a failed build with a precise message rather than a broken artifact.
Runtime variables are untouched and still resolved from .env at deploy time —
the check reads image lines only, and 35 ${} references survive 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.
Adding retina-telemetry to
docker-compose.ymlwas not enough to ship it.The bug
The artifact build resolves image tags with one hand-written sed clause per variable, and
TELEMETRY_Vhad none. The generated manifest kept a literal:Which is exactly what the comment above that block warns about:
skopeoreceives${TELEMETRY_V:-v0.1.0}as a tag. The release either fails there, or produces an artifact whose telemetry service can never start on a node.Why nothing caught it
The compose file is valid.
docker compose configresolves the variable correctly. The same service block ran on two live nodes against production. The defect isn't in the compose file at all — it's in a transformation of it that enumerates its variables by hand, in another file, with no test.The fix
The seventh clause, plus a guard that removes the need to remember an eighth: every image line in the generated manifest must be a literal, and the build fails naming the variable that was missed.
Verified against the merged
docker-compose.yml:${}refs preservedRuntime variables are deliberately left alone and still resolved from
.envat deploy time — the check readsimage:lines only.bash -nclean; generated manifest parses as YAML with all 10 services.🤖 Generated with Claude Code