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

fix(appset): Always remove ownerReferences when appset policy doesn't allow app's deletion (#12172) #16506

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

mikutas
Copy link
Contributor

@mikutas mikutas commented Dec 1, 2023

This is following up of #15903 , and relates to #12172 .
The background is here.

As-is (master)

When deleting ApplicationSet, there are two ways to process dependent Applications.

  • ApplicationSet has resources-finalizer.argocd.argoproj.io finalizer: ownerReferences of dependent Apps will be deleted (and Apps will be orphaned)
  • ApplicationSet doesn't have the finalizer: ownerReferences won't be deleted (and Apps will be deleted)

To-be (this PR)

The finalizer doesn't matter.
When policy doesn't allow deletion, ownerReferences will be always deleted (and Apps will be always orphaned).

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

@mikutas mikutas changed the title fix(appset): remove unnecessary condition (#12172) fix(appset): Always remove ownerReferences when appset policy doesn't allow app's deletion (#12172) Dec 1, 2023
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (35f1ee7) 49.49% compared to head (82b13e3) 49.49%.

Files Patch % Lines
...cationset/controllers/applicationset_controller.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #16506   +/-   ##
=======================================
  Coverage   49.49%   49.49%           
=======================================
  Files         270      270           
  Lines       47489    47488    -1     
=======================================
  Hits        23506    23506           
+ Misses      21672    21671    -1     
  Partials     2311     2311           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mikutas mikutas marked this pull request as ready for review December 2, 2023 00:15
@mikutas mikutas requested review from a team as code owners December 2, 2023 00:15
Copy link
Member

@gdsoumya gdsoumya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
@crenshaw-dev crenshaw-dev merged commit 9179835 into argoproj:master Dec 8, 2023
@mikutas mikutas deleted the 12172-2 branch December 9, 2023 04:10
vladfr pushed a commit to vladfr/argo-cd that referenced this pull request Dec 13, 2023
… allow app's deletion (argoproj#12172) (argoproj#16506)

* fix(appset): remove unnecessary condition

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

* docs: update explanation about policy

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

---------

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
… allow app's deletion (argoproj#12172) (argoproj#16506)

* fix(appset): remove unnecessary condition

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

* docs: update explanation about policy

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

---------

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
JulienFuix pushed a commit to JulienFuix/argo-cd that referenced this pull request Feb 6, 2024
… allow app's deletion (argoproj#12172) (argoproj#16506)

* fix(appset): remove unnecessary condition

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

* docs: update explanation about policy

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

---------

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
lyda pushed a commit to lyda/argo-cd that referenced this pull request Mar 28, 2024
… allow app's deletion (argoproj#12172) (argoproj#16506)

* fix(appset): remove unnecessary condition

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

* docs: update explanation about policy

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

---------

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
Signed-off-by: Kevin Lyda <kevin@lyda.ie>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
… allow app's deletion (argoproj#12172) (argoproj#16506)

* fix(appset): remove unnecessary condition

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

* docs: update explanation about policy

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>

---------

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants