Stop racing ourselves on the docker release artifacts#826
Merged
Conversation
The docker build was running `miren download release -g`, which fetches
the base release tarball and its .sha256 sidecar from api.miren.cloud.
Trouble is, build-and-push-docker runs in parallel with upload-to-miren,
which is publishing those same files for the release we are currently
building. The small .sha256 lands on the server before the big .tar.gz
finishes, so the docker job downloads the new hash paired with the
still-old tarball and dies with a checksum mismatch. Every release
playing this game with itself.
We already have the tarball locally in the docker job (extracted into
docker/artifacts/${TARGETARCH}/), so swap the network download for a
plain COPY into /var/lib/miren/release/. No more dependency on the
publish job intermediate state.
This does not fix the underlying api.miren.cloud inconsistency window;
users running `miren download release -g` mid-release can still hit
it. Filed as MIR-1170 with a proposal for OCI-style content-addressed
asset layout that would close it for all consumers.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request modifies Comment |
evanphx
approved these changes
May 27, 2026
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 release pipeline had this weird self-own where the docker build job would race against the upload-to-miren job that was, at that exact moment, publishing the artifacts the docker build was trying to download. Both jobs gate on
[init, test, package]and run in parallel, and the upload pushes a .tar.gz and its .sha256 sidecar through a parallel worker pool. The small .sha256 finishes first, so for a 30-60 second window api.miren.cloud is serving the new hash next to the still-old tarball. The docker build'smiren download release -gwould predictably pull both and blow up on a checksum mismatch. Failure was at https://github.com/mirendev/runtime/actions/runs/26537880941.The fun part: the docker job already has the tarball locally. The workflow extracts
release-base-linux-${arch}.tar.gzintodocker/artifacts/${TARGETARCH}/before invoking buildx, and that's the exact same content the Dockerfile was turning around and re-downloading from miren.cloud. Pre-existing TODO in the Dockerfile even acknowledged the redundancy. So this just swaps theRUN miren download release -gfor aCOPY docker/artifacts/${TARGETARCH}/ /var/lib/miren/release/and calls it a day.Worth being honest about what this doesn't fix: the api.miren.cloud inconsistency is still real for end users running
miren download release -gagainst mutable channels (main,latest) while a release is mid-publish. The window is narrow and a retry clears it, but the bug exists. Filed as MIR-1170 with a proposal for an OCI-style content-addressed asset layout that would close it for all consumers.