fix(store): being served old docker images and not detecting a new one#409
Open
fix(store): being served old docker images and not detecting a new one#409
Conversation
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.
Summary
You weren't overthinking — your diagnosis was exactly right.
With :latest tags, the embedded K8s manifest is byte-identical
across binary versions, so kubectl apply reports "unchanged"
and the cached pod keeps serving the old image forever. New
users updating their binary saw stale pods.
Changes (188 lines added, 3 changed)
internal/images/images.go (new) — Resolve(repo) policy helper:
buildAndImportLocalImages flow)
without ldflags)
commit)
type=sha,format=short tag)
internal/images/images_test.go (new) — 6 tests covering all
branches plus case-insensitive OBOL_DEVELOPMENT.
cmd/obol/sell.go — demo-server image now goes through
images.Resolve.
internal/tunnel/tunnel.go — storefront image now goes through
images.Resolve.
.github/workflows/docker-publish-x402.yml — added
type=sha,format=short,prefix= so the binary's short-SHA
GitCommit resolves. Long SHA stays for Trivy compat.
.github/workflows/docker-publish-storefront.yml — added both
short AND long SHA tags. (Storefront workflow had the same
MANIFEST_UNKNOWN Trivy bug x402 had — fixed in passing.)
How this fixes the user's bug
After this:
SHA) on every commit to main
injected via ldflags
manifest with image: ...storefront:f2c0508
SHA), the manifest changes → kubectl detects diff → rolls the
pod → fresh image pulled
Dev mode (OBOL_DEVELOPMENT=true) still uses :latest and the
local-build/k3d-import path — unchanged behavior.
Known follow-ups (deferred, called out for transparency)
x402-verifier, serviceoffer-controller. Same problem, but these
go through helmfile not Go — fixing requires
--state-values-set imageTag=... plumbing in stack.go + template
gotmpl interpolation. The TODOs in x402.yaml/llm.yaml already
flag this.
workflows trigger on the same tags: v* push and run in
parallel. If image jobs are slower, a freshly-installed binary
briefly references an image that hasn't been pushed →
ImagePullBackOff. Fix is needs: ordering in release.yml. Likely
worth it before any wider rollout.
Want me to tackle either follow-up next, or push these and
validate against the user who saw the bug?