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

feat(ui): Show prompt when every resource requires pruning #16603

Merged
merged 6 commits into from
Dec 18, 2023

Conversation

ashutosh16
Copy link
Contributor

@ashutosh16 ashutosh16 commented Dec 14, 2023

fixes #16600

When a user prunes partial resources, it is not necessary to send a popup message every time. If the user performs a full sync and Argo attempts to delete all resources, I would like to display a pop-up message to the user

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.
  • 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.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

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

Comparison is base (23e0d52) 49.51% compared to head (b0f5238) 49.51%.
Report is 1 commits behind head on master.

Files Patch % Lines
controller/appcontroller.go 43.82% 43 Missing and 7 partials ⚠️
controller/hook.go 58.87% 29 Missing and 15 partials ⚠️
pkg/apis/application/v1alpha1/types.go 0.00% 6 Missing ⚠️
controller/state.go 70.00% 2 Missing and 1 partial ⚠️
controller/sync.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16603      +/-   ##
==========================================
- Coverage   49.51%   49.51%   -0.01%     
==========================================
  Files         270      271       +1     
  Lines       47505    47664     +159     
==========================================
+ Hits        23524    23602      +78     
- Misses      21669    21731      +62     
- Partials     2312     2331      +19     

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

@ashutosh16 ashutosh16 marked this pull request as ready for review December 14, 2023 17:00
@ashutosh16 ashutosh16 requested a review from a team as a code owner December 14, 2023 17:00
@ashutosh16 ashutosh16 force-pushed the ui-prune-msg branch 2 times, most recently from e4c844f to c6b4306 Compare December 14, 2023 22:55
@ashutosh16 ashutosh16 changed the title fix(ui): show prompt when using prune option fix(ui): Show prompt when every resource requires pruning Dec 14, 2023
@crenshaw-dev crenshaw-dev changed the title fix(ui): Show prompt when every resource requires pruning feat(ui): Show prompt when every resource requires pruning Dec 18, 2023
Copy link
Member

@rbreeze rbreeze left a comment

Choose a reason for hiding this comment

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

Good idea, LGTM!

ashutosh16 and others added 6 commits December 18, 2023 11:26
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
@crenshaw-dev crenshaw-dev enabled auto-merge (squash) December 18, 2023 20:01
@crenshaw-dev crenshaw-dev merged commit 9abc1cc into argoproj:master Dec 18, 2023
25 checks passed
JulienFuix pushed a commit to JulienFuix/argo-cd that referenced this pull request Feb 6, 2024
…16603)

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* chore: update message and simplify code

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* don't warn on partial sync

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix(ui): lint

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

---------

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
penglongli pushed a commit to penglongli/argo-cd that referenced this pull request Mar 6, 2024
…16603)

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* chore: update message and simplify code

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* don't warn on partial sync

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix(ui): lint

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

---------

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: penglongli <pelenli@tencent.com>
lyda pushed a commit to lyda/argo-cd that referenced this pull request Mar 28, 2024
…16603)

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* chore: update message and simplify code

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* don't warn on partial sync

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix(ui): lint

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

---------

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@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
…16603)

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

fix(ui): show prompt when using prune option

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

* chore: update message and simplify code

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* don't warn on partial sync

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* fix(ui): lint

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>

---------

Signed-off-by: ashutosh16 <11219262+ashutosh16@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@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.

Prompt user for conformation if a sync would prune all resources
3 participants