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

chore: improve argocd app delete #10160

Merged
merged 1 commit into from
Aug 8, 2022
Merged

Conversation

my-git9
Copy link
Member

@my-git9 my-git9 commented Aug 1, 2022

Improve the confirmation method of argocd app delete, add general confirmation function

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).
  • 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).

@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 45.99%. Comparing base (33f1759) to head (3fa1da5).
Report is 2695 commits behind head on master.

Files Patch % Lines
cmd/argocd/commands/app.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10160      +/-   ##
==========================================
+ Coverage   45.92%   45.99%   +0.06%     
==========================================
  Files         227      226       -1     
  Lines       27403    27408       +5     
==========================================
+ Hits        12584    12605      +21     
+ Misses      13110    13089      -21     
- Partials     1709     1714       +5     

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

@jannfis
Copy link
Member

jannfis commented Aug 1, 2022

On this note, I think a real improvement would be to refactor this code to use

func AskToProceed(message string) bool {
:)

@my-git9
Copy link
Member Author

my-git9 commented Aug 2, 2022

On this note, I think a real improvement would be to refactor this code to use

func AskToProceed(message string) bool {

:)

There is an option of 'A' for confirmAnswer, which seems to be not so optimized: https://github.com/argoproj/argo-cd/blob/master/cmd/argocd/commands/app.go#L1104

@my-git9 my-git9 force-pushed the appdelete1 branch 3 times, most recently from ed5654c to 0ca1aa8 Compare August 7, 2022 09:41
@my-git9
Copy link
Member Author

my-git9 commented Aug 7, 2022

On this note, I think a real improvement would be to refactor this code to use

func AskToProceed(message string) bool {

:)

Hi @jannfis , according to your suggestion, I made some changes to this PR, can you help me to review it? Thanks

Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

lgtm!

@crenshaw-dev crenshaw-dev merged commit 729c9a8 into argoproj:master Aug 8, 2022
ashutosh16 pushed a commit to ashutosh16/argo-cd that referenced this pull request Aug 11, 2022
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