-
Notifications
You must be signed in to change notification settings - Fork 446
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
[v0.13] create --append with missing builder changed from warn to error #2347
Comments
#2346 seems to be linked |
Yes we bail out early since v0.13 as the instance should already exists when appending. This was changed specifically for programmatic invocations of builder creation. |
I think as a default, erroring behavior makes sense. The user is asking to append a node to a named builder that does not exist. We might consider adding some way to signal the "append-or-create" mode, but not sure what way exactly this could be passed. |
Ok thanks at least the behaviour is now explicit. However having an idempotent command would still be useful. So maybe something like docker buildx create \
--append-or-create \
--name buildkit \ or docker buildx create \
--append --create-if-not-exists \
--name buildkit \ I am not very good at naming things, sorry 😅 |
I think we could add a new flag |
Contributing guidelines
I've found a bug and checked that ...
Description
Hi,
We are extensively using buildx with remote buildkit nodes, notably for its speed and scheduling of build on native CPU architectures (arm64 build on arm64 VMs, same for amd64)
Before the version
0.13.0
, we used the following syntax in our CI/CD pipelinesNote that we use the same syntax
docker buildx create --append
both time. This is not well documentend but worked nicely, with a warning for the first commandWith the
0.13.0
release, this behavious was broken, with the following errorIt seems that this is linked to a refactoring of the create command on this commit (@crazy-max )
Since buildx is automatically shipped with docker, the
0.13.0
release was unknowingly shipped with a daily rebuild ofdocker:24-cli
and broke our CI/CD.While this is an undocumented feature, and we might want to explicitely fail on this usage, I find the usage of an idempotent command to add node to a builder very useful.
Indeed, in our case, we dynamically generate the CI depending on how many CPU archs we want to build, either 1 or more. So we would be forced to implement a logic like "if this is the first command, do not put
--append
, otherwise do. While this is doable, idempotent command are truly useful. Imagine a world withoutkubectl apply
but onlykubectl create
andkubectl patch
!If you agree with my proposal, I might draft a PR, seems it looks not that complicated to reintroduce this logic. What do you think ?
Expected behaviour
Actual behaviour
Buildx version
v0.13.0
Docker info
No response
Builders list
Configuration
FROM alpine
Build logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: