fix(cli): allow multiple provider profiles to be deleted - #3032
Conversation
Signed-off-by: Gordon Sim <gsim@redhat.com>
elezar
left a comment
There was a problem hiding this comment.
The batch loop still exits on the first RPC error because .into_diagnostic()? is inside the loop. For provider profiles, a missing, source-managed, or in-use profile returns an RPC error, so later IDs are never attempted.
This matches the current provider delete fail-fast behavior, but it conflicts with this issue's acceptance criteria to attempt each supplied profile and report each result independently. Could we continue through all IDs, print each failure, and return an aggregated nonzero error afterward? Please also add a mixed-result test such as success, in-use or missing, then success.
Follow-up: sandbox delete, provider delete, and workspace delete also stop on the first RPC error. Please consider a separate issue to define and standardize batch-delete error semantics across the CLI, including per-target reporting and aggregate exit status.
|
@elezar I propose to reword the acceptance criteria for the associated issue, then open a separate issue and PR for improving the error handling of deletion across all three resource types. Is that good with you? |
That's fine. |
Summary
Makes provider profile deletion more consistent with that of sandboxes and profiles by allowing the deletion of multiple items.
Related Issue
Closes #3029
Changes
provider profile deletecommand.Testing
mise run pre-commitpassesChecklist