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

[v0.19] bake: remove empty values set by --set #2861

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

tonistiigi
Copy link
Member

regression from b2c0c26
fixes #2858 for v0.19

These parser functions are called for --set to
resolve entitlement paths that would be automatically added and will fail for empty value.

The empty values would already be ignored but in v0.19 is done after merging the --set values and then calling parse again.

@tonistiigi tonistiigi requested a review from crazy-max December 16, 2024 07:20
@tonistiigi tonistiigi added this to the v0.19.3 milestone Dec 16, 2024
@crazy-max
Copy link
Member

crazy-max commented Dec 16, 2024

https://github.com/docker/buildx/actions/runs/12347799964/job/34460332018?pr=2861#step:6:183

Needs to pick the xx update

edit: done in #2862, needs rebase

These parser functions are called for `--set` to
resolve entitlement paths that would be automatically added
and will fail for empty value.

The empty values would already be ignored but in v0.19 is
done after merging the `--set` values and then calling
parse again.

Signed-off-by: Tonis Tiigi <[email protected]>
@crazy-max
Copy link
Member

@tonistiigi Pushed extra commit to test empty override

Comment on lines +2032 to +2047
// https://github.com/docker/buildx/issues/2858
func TestOverrideEmpty(t *testing.T) {
fp := File{
Name: "docker-bake.hcl",
Data: []byte(`
target "app" {
output = ["./bin"]
}
`),
}

ctx := context.TODO()

_, _, err := ReadTargets(ctx, []File{fp}, []string{"app"}, []string{"app.output="}, nil, &EntitlementConf{})
require.NoError(t, err)
}
Copy link
Member

@crazy-max crazy-max Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fyi @jsternberg, we should pick this in #2814

@tonistiigi tonistiigi marked this pull request as ready for review December 16, 2024 18:15
@tonistiigi tonistiigi merged commit 62d486d into docker:v0.19 Dec 16, 2024
122 checks passed
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