Skip to content
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

Triggering deletion of application as appset resource with "non-cascading" option selected leads to cascading deletion #20432

Open
3 tasks done
Brightside56 opened this issue Oct 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Brightside56
Copy link
Contributor

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

Triggering deletion of app as appset item with "non-cascading" option selected - leads to cascading deletion

To Reproduce

  1. Create app of appsets with appset containing other apps
  2. Navigate to app of appsets
  3. Delete appset child application by pressing menu with three dots, "delete", "non-cascading", "ok" (or by clicking on application and pressing "delete", "non-cascading", "ok")
  4. See that application resources are also deleted with application

Important: this behavior cannot be reproduced when deleting application which is not appset child application (e.g. standalone application in app of apps)

Expected behavior

Application resources aren't deleted with application, because UI offers non-cascading deletion in this case. UI should not mislead users

Screenshots

Screenshot 2024-10-17 at 20 45 18 Screenshot 2024-10-17 at 20 43 32

Version

2.12.3
@Brightside56 Brightside56 added the bug Something isn't working label Oct 17, 2024
@mikutas
Copy link
Contributor

mikutas commented Oct 18, 2024

As far as I know there are at least two "delete" API, Delete and DeleteResource.

API documentation is here: your.argocd.domain/swagger-ui
cf. https://argo-cd.readthedocs.io/en/stable/developer-guide/api-docs/

Delete is exclusive for Application, and DeleteResource is used for any resources (including Application), and the meaning of "non-cascading" is different from each other.

I think, perhaps, when we delete a node which isn't a root, DeleteResource is called even if the node is Application.

(To project members: please correct me if I'm wrong)

@crenshaw-dev
Copy link
Member

@mikutas that's exactly correct! I think maybe we should have a special UI for DeleteResource when deleting an Application to help the user understand the cascade options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants