Skip to content

fix: racy double creation of docker tag#92

Merged
hiverge-robot merged 2 commits into
mainfrom
1uc/fix-double-push
Feb 10, 2026
Merged

fix: racy double creation of docker tag#92
hiverge-robot merged 2 commits into
mainfrom
1uc/fix-double-push

Conversation

@luc-hiverge

@luc-hiverge luc-hiverge commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

When running:

$ hive create exp -f hive.yaml noop-

I frequently run into the following error:

Image build command: docker buildx build --platform linux/amd64 --file /tmp/tmpix44g6d5/repo/Dockerfile --tag temp-image:latest --load /tmp/tmpix44g6d5/repo
Image build command: docker buildx build --platform linux/amd64 --file /tmp/tmp94_lihwo/Dockerfile --tag gcr.io/runsandbox-449400/random-fitness:1936839 --load --push /tmp/tmp94_lihwo
Build STDERR:
...

#12 [8/8] RUN rsync -a /app/repo/ /app/.backup/
#12 CACHED

#13 exporting to image
#13 exporting layers done
#13 exporting manifest sha256:03a5775f0be41fe32d8ed74eb40116c9aeeeb5519a13bff0d0143df72736f2fb done
#13 exporting config sha256:c6e2c2e11af13ef90214a0b26dcd24427affb3abcc0cf70472ce7c02c8416568 done
#13 exporting attestation manifest sha256:b4987b28c9281b4974ae96f59de59ab57cc15e75b8cea1b2e04385f93d19c662 0.1s done
#13 exporting manifest list sha256:02606d3040576dd32bf1c44b97da170ff673f5fc703246208b32572d8f600eba 0.0s done
#13 naming to gcr.io/runsandbox-449400/random-fitness:1936839 done
#13 unpacking to gcr.io/runsandbox-449400/random-fitness:1936839 done
#13 CANCELED

#14 exporting to image
#14 exporting layers done
#14 exporting manifest sha256:03a5775f0be41fe32d8ed74eb40116c9aeeeb5519a13bff0d0143df72736f2fb done
#14 exporting config sha256:c6e2c2e11af13ef90214a0b26dcd24427affb3abcc0cf70472ce7c02c8416568 done
#14 exporting attestation manifest sha256:b4987b28c9281b4974ae96f59de59ab57cc15e75b8cea1b2e04385f93d19c662 0.1s done
#14 exporting manifest list sha256:02606d3040576dd32bf1c44b97da170ff673f5fc703246208b32572d8f600eba 0.0s done
#14 naming to gcr.io/runsandbox-449400/random-fitness:1936839 done
#14 ERROR: image "gcr.io/runsandbox-449400/random-fitness:1936839": already exists

The documentation claims that --load is only valid for single-platform builds. Since, we're doing multi-platform build, I suspect this flag might be invalid.

Removing --load is highly effective at stopping the issue, especially in the version shown in the first commit. The second version I've run a few times and is too succeeds (but it's identical to the previous version in my setup).

The documentation of `--load` says it's for single platform builds.
These are never single-platform builds.

    https://docs.docker.com/reference/cli/docker/buildx/build/#load

Therefore, we can just remove `--load`.
@hiverge-robot hiverge-robot added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Feb 6, 2026
@luc-hiverge

Copy link
Copy Markdown
Contributor Author

/kind fix

@luc-hiverge luc-hiverge changed the title fix: racy double creatation of docker tag fix: racy double creation of docker tag Feb 6, 2026
@luc-hiverge

Copy link
Copy Markdown
Contributor Author

/kind bug

@hiverge-robot hiverge-robot added bug Categorizes issue or PR as related to a bug. and removed do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Feb 6, 2026
@ky-hiverge

Copy link
Copy Markdown
Member

/lgtm
/approve

I add this for some reason before, but forgot it. Merge for now.

@hiverge-robot hiverge-robot added lgtm Looks good to me, indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 10, 2026
@hiverge-robot hiverge-robot merged commit 4f4e9de into main Feb 10, 2026
40 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bug Categorizes issue or PR as related to a bug. lgtm Looks good to me, indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants