Conversation
ittus
force-pushed
the
fix/buildx-builder-exists-race
branch
from
September 30, 2026 13:33
ac33849 to
2f75cc3
Compare
ittus
marked this pull request as ready for review
September 30, 2026 13:38
…ing flytex concurrently `docker buildx create --name flytex` reports a taken name as `existing instance for "flytex" but no append mode`, not "already exists", so the concurrent-create guard from flyteorg#1167 never fired and parallel image builds on a host without the builder aborted the deploy. Match "but no append mode" as well as "already exists". An existing builder with a mismatched driver still raises. Signed-off-by: Thang Vu <vuminhthang.cm@gmail.com>
ittus
force-pushed
the
fix/buildx-builder-exists-race
branch
from
September 30, 2026 14:51
2f75cc3 to
ab7962d
Compare
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.
Why
flyte deploybuilds missing images concurrently. On a host with noflytexbuilder yet (a fresh CI runner, a new laptop), every build runsdocker buildx ls, sees nothing, and runsdocker buildx create --name flytex. The secondcreatefails and the whole deploy aborts:#1167 added a guard for this race, but it matches
"already exists"in stderr. buildx never prints that for a duplicatecreate --name. The message comes frombuilder/builder.go#L485:already existsis only printed for a duplicate node name inside a builder or a name that clashes with a Docker context. The test added in #1167 fakes the stderrexisting instance for "flytex" already exists, which buildx never prints, so the test passes without exercising the real message.What
_ensure_buildx_builderreuses the builder whencreatefails withbut no append modeas well asalready exists.but no append moderather than theexisting instance forprefix.builder.go#L488also starts with that prefix (existing instance for %q but has mismatched driver %q), and that builder isn't one we should reuse, so it still raisesImageBuildError.createsucceeds or fails for another reason.Test