Description
Summary
It would be beneficial for some admin commands to display an "Are you sure" prompt before proceeding, with some extra info about the expected result of the command.
Motivation
Example use cases:
- Upon importing apps with prune option, displaying the prompt with the number of the apps that are expected to be deleted.
"argocd admin export" only exports ArgoCD apps from the same namespace as where ArgoCD is deployed #14596 - Confirm removal of repo credentials:
feat: add prompting to confirm remove of repository credentials #11040 - Confirm removal of GPG keys
feat: add prompting to confirm deletion of gpg public key #10415
Proposal
Enabling the prompt by default is a breaking change for CI pipelines/other automations running argocd cmd.
As a gradual non-breaking solution, a feature flag enable-argocd-cmd-prompt: false
can be introduced, along with the supporting core functionality, and docs stating that enabling this feature would require a change in the CI/automation that runs the argocd cmd.
An additional "--auto-approve-prompt" flag should be also be introduced for usage in the CI/automation after enabling the feature flag.
In the future, if it would be desired for the default behavior to be with the prompt, enable-argocd-cmd-prompt: true
can be introduced as the default, for v3, along with detailed docs.