Skip to content

fix(cli): allow specifying empty provisioner tag set with --provisioner-tag="-" #18205

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jun 3, 2025

Relates to #17818

Note: due to limitations in cobra/serpent I ended up having to use - to signify absence of provisioner tags. This value is not a valid key-value pair and thus not a valid tag.

@johnstcn johnstcn self-assigned this Jun 3, 2025
@johnstcn johnstcn requested review from mtojek and mafredri June 3, 2025 14:55
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Minor suggestion for improving clarity, but otherwise LGTM! I think the - solution is a good compromise that fits well with existing behavior.

@johnstcn johnstcn force-pushed the cj/cli/delete-tag branch from ce22829 to 0a47130 Compare June 3, 2025 15:29
@johnstcn johnstcn merged commit da9a313 into main Jun 3, 2025
36 checks passed
@johnstcn johnstcn deleted the cj/cli/delete-tag branch June 3, 2025 15:55
@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2025
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

post-merge approval

@@ -80,6 +81,46 @@ func (r *RootCmd) templatePush() *serpent.Command {
createTemplate = true
}

var tags map[string]string
// Passing --provisioner-tag="-" allows the user to clear all provisioner tags.
Copy link
Member

Choose a reason for hiding this comment

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

Nice workaround 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants