argo-cd icon indicating copy to clipboard operation
argo-cd copied to clipboard

Improve alerting when resources will be deleted with sync actions

Open jwinters01 opened this issue 2 months ago • 0 comments

Summary

When a user replaces or syncs their application with pruning enabled, there should be some feedback warning the user if their resources will be deleted.

Motivation

Currently, replace and "Sync with prune" can delete resources that no longer exist in Git, but there is no warning that this will cause resources to be deleted. This can cause accidental deletion of resources if a user isn't completely familiar with what they are doing.

Proposal

Sync with Prune

Currently, we already show a warning if the user is about to delete all the resources for the app (code here) we can extend this to instead warn the user if any resources are deleted, instead of all.

Replace

Replace already shows a warning, but the warning looks more like an informational message and less like a warning.


For both implementations, we should use the same modal template as with the delete action, to make it more obvious that this is a destructive action: Image

jwinters01 avatar Dec 03 '25 16:12 jwinters01