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): prevent app deletion according to appset policy (#12172) #15903

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

mikutas
Copy link
Contributor

@mikutas mikutas commented Oct 11, 2023

Fixes #12172

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(applicationset): prevent app deletion according to appset policy fix(applicationset): prevent app deletion according to appset policy (#12172) Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

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

Comparison is base (3d6568d) 49.52% compared to head (37ef33d) 49.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #15903      +/-   ##
==========================================
- Coverage   49.52%   49.51%   -0.02%     
==========================================
  Files         269      269              
  Lines       46990    47010      +20     
==========================================
+ Hits        23272    23277       +5     
- Misses      21435    21448      +13     
- Partials     2283     2285       +2     
Files Coverage Δ
...cationset/controllers/applicationset_controller.go 60.14% <33.33%> (-0.65%) ⬇️

... and 1 file with indirect coverage changes

☔ 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 October 12, 2023 01:11
@mikutas mikutas requested a review from a team as a code owner October 12, 2023 01:11
@mikutas mikutas force-pushed the 12172 branch 2 times, most recently from f29e3b4 to 0f921e0 Compare October 13, 2023 08:06
@crenshaw-dev crenshaw-dev changed the title fix(applicationset): prevent app deletion according to appset policy (#12172) fix(appset): prevent app deletion according to appset policy (#12172) Oct 13, 2023
@mikutas mikutas force-pushed the 12172 branch 8 times, most recently from 3d6580e to 5c62f10 Compare October 20, 2023 01:23
@mikutas mikutas force-pushed the 12172 branch 4 times, most recently from 7d9f59f to 21c369c Compare October 30, 2023 09:23
@mikutas mikutas force-pushed the 12172 branch 2 times, most recently from 3fccd7e to 0d95012 Compare November 3, 2023 23:57
Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

Thanks @mikutas for the PR!!
The change looks good!!

Copy link
Member

@ishitasequeira ishitasequeira left a comment

Choose a reason for hiding this comment

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

@mikutas, can you resolve the conflicts?

@mikutas
Copy link
Contributor Author

mikutas commented Nov 8, 2023

rebased and resolved conflicts, but some checks failed. I'm trying to fix in #16275

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
@ishitasequeira ishitasequeira merged commit 30ff2e5 into argoproj:master Nov 10, 2023
25 checks passed
jmilic1 pushed a commit to jmilic1/argo-cd that referenced this pull request Nov 13, 2023
…j#12172) (argoproj#15903)

* fix(applicationset): prevent app deletion according to appset policy

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

* test: add unit test

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

* fix: unit test

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

* fix: remove TODO

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

---------

Signed-off-by: mikutas <23391543+mikutas@users.noreply.github.com>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
@mikutas mikutas deleted the 12172 branch November 14, 2023 16:00
vladfr pushed a commit to vladfr/argo-cd that referenced this pull request Dec 13, 2023
…j#12172) (argoproj#15903)

* fix(applicationset): prevent app deletion according to appset policy

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

* test: add unit test

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

* fix: unit test

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

* fix: remove TODO

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
…j#12172) (argoproj#15903)

* fix(applicationset): prevent app deletion according to appset policy

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

* test: add unit test

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

* fix: unit test

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

* fix: remove TODO

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
…j#12172) (argoproj#15903)

* fix(applicationset): prevent app deletion according to appset policy

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

* test: add unit test

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

* fix: unit test

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

* fix: remove TODO

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
…j#12172) (argoproj#15903)

* fix(applicationset): prevent app deletion according to appset policy

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

* test: add unit test

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

* fix: unit test

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

* fix: remove TODO

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.

Deleting ApplicationSet causes Application deletion even if applicationset-controller policy is 'create-only'
2 participants