feat: support multiple package removal#5013
Conversation
✅ Deploy Preview for zarf-docs canceled.
|
a15585c to
46315ca
Compare
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Signed-off-by: Avadhut03 <avadhutkul60@gmail.com>
7699d76 to
27b6c0e
Compare
Signed-off-by: Avadhut03 <avadhutkul60@gmail.com>
Signed-off-by: Avadhut03 <avadhutkul60@gmail.com>
29b4635 to
907d3d5
Compare
|
Thank you for the patience @Avadhut03 ! We'll get this into review shortly. |
brandtkeller
left a comment
There was a problem hiding this comment.
Initial thought around inputs that will be acceptable.
I do want to leave open the distinct possibility that we decide not to do this work. It's still very much appreciated and we should evaluate it through this PR - but I also don't want to make the command oddly-shaped by adding variance in how the command operates based on number of packages.
| return fmt.Errorf("unable to load the package: %w", err) | ||
| } | ||
|
|
||
| removeOpt := packager.RemoveOptions{ |
There was a problem hiding this comment.
If we want to pursue this change (leaving the option open to leave the command as-is) - I think we'll want additional validation on the options you can pass in.
things like namespace override shouldn't be accepted on remove when multiple packages are being targeted. Same for values and potentially other inputs.
There was a problem hiding this comment.
Thanks for the feedback! That makes sense. I agree that the command shouldn't have ambiguous behavior depending on the number of packages.
If we decide to move forward with supporting multiple package removal, I can add validation to explicitly reject options that don't make sense in that context (for example, --namespace, --values, --set, and any other package-specific overrides). That way the behavior remains predictable and we avoid ambiguous semantics.
If, after discussion, we decide that supporting multiple package removal isn't the right direction for the CLI, I'm also happy to keep the command as-is. I'll wait for the design decision before investing further in the implementation.
Description
This PR adds support for removing multiple packages in a single zarf package remove command by allowing multiple package names or sources to be passed as arguments. The existing interactive package selection behavior is preserved when no arguments are provided, and the command now iterates through each specified package
Related Issue
Fixes #4992
Checklist before merging