Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: set same ref when building on multiple nodes #2572

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Jul 3, 2024

Currently when building with bake we are setting the build ref for each target which results with the same ref being set in solve request when building on multiple nodes:

buildx/commands/bake.go

Lines 232 to 238 in 5656c98

for k, b := range bo {
b.Ref = identity.NewID()
b.GroupRef = groupRef
b.ProvenanceResponseMode = prm
refs = append(refs, b.Ref)
bo[k] = b
}

But for build we don't do this in commands package and therefore it will generate a different one for each node:

@tonistiigi I think we should align build with bake to have the same ref across nodes but let me know if this should be the other way around.

cc @fiam

@crazy-max crazy-max added this to the v0.16.0 milestone Jul 3, 2024
@crazy-max crazy-max requested a review from tonistiigi July 3, 2024 13:02
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max changed the title build: set same ref id when building on multiple nodes build: set same ref when building on multiple nodes Jul 3, 2024
@crazy-max crazy-max marked this pull request as ready for review July 3, 2024 16:03
@tonistiigi tonistiigi merged commit 1ffc6f1 into docker:master Jul 3, 2024
103 checks passed
@crazy-max crazy-max deleted the build-ref-multi-nodes branch July 3, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants