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

Broken buildkitd config doesn't prevent creating a new builder #2853

Open
3 tasks done
dvdksn opened this issue Dec 11, 2024 · 0 comments · May be fixed by #2864
Open
3 tasks done

Broken buildkitd config doesn't prevent creating a new builder #2853

dvdksn opened this issue Dec 11, 2024 · 0 comments · May be fixed by #2864
Assignees
Labels
area/builder kind/bug Something isn't working
Milestone

Comments

@dvdksn
Copy link
Contributor

dvdksn commented Dec 11, 2024

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Buildx does not prevent you from creating a new builder with a broken buildkitd config, but then it does not allow you to remove the builder if you did create it.

Expected behaviour

I should not be able to create a broken builder.

Actual behaviour

$ cat cfg.toml 
[worker.oci]
	gc = "maybe"
$ docker buildx create --name=bad_builder --buildkitd-config cfg.toml 
ERROR: failed to parse config: (5, 5): Can't convert maybe(string) to bool
$ docker buildx ls
NAME/NODE           DRIVER/ENDPOINT     STATUS    BUILDKIT   PLATFORMS
default             docker                                   
 \_ default          \_ default         running   v0.17.3    linux/amd64 (+2), linux/arm64, linux/arm (+2), linux/ppc64le, (3 more)
desktop-linux*      docker                                   
 \_ desktop-linux    \_ desktop-linux   running   v0.17.3    linux/amd64 (+2), linux/arm64, linux/arm (+2), linux/ppc64le, (3 more)
bad_builder         docker-container    error                

Cannot load builder bad_builder: failed to parse config: (5, 5): Can't convert maybe(string) to bool
$ docker buildx rm bad_builder
failed to remove bad_builder: failed to parse config: (5, 5): Can't convert maybe(string) to bool
ERROR: failed to remove one or more builders

Buildx version

github.com/docker/buildx 3e3242c 3e3242c

Docker info


Builders list

NAME/NODE           DRIVER/ENDPOINT     STATUS    BUILDKIT   PLATFORMS
default             docker                                   
 \_ default          \_ default         running   v0.17.3    linux/amd64 (+2), linux/arm64, linux/arm (+2), linux/ppc64le, (3 more)
desktop-linux*      docker                                   
 \_ desktop-linux    \_ desktop-linux   running   v0.17.3    linux/amd64 (+2), linux/arm64, linux/arm (+2), linux/ppc64le, (3 more)
bad_builder         docker-container    error

Configuration

[worker.oci]
	gc = "maybe"

Build logs


Additional info

No response

@crazy-max crazy-max self-assigned this Dec 11, 2024
@crazy-max crazy-max added kind/bug Something isn't working area/builder and removed status/triage labels Dec 11, 2024
@crazy-max crazy-max added this to the v0.20.0 milestone Dec 11, 2024
@crazy-max crazy-max linked a pull request Dec 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/builder kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants