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: argocd app delete apps by label #10118

Merged
merged 13 commits into from Oct 1, 2022
Merged

Conversation

danielhelfand
Copy link
Contributor

Closes #10091

Allow argocd app delete command to delete apps having a common label. UX is argocd app delete -l foo=bar. Similar to argocd app sync -l experience.

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

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 Jul 27, 2022

Codecov Report

Base: 45.70% // Head: 45.66% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (94c1f35) compared to base (66d82fc).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10118      +/-   ##
==========================================
- Coverage   45.70%   45.66%   -0.04%     
==========================================
  Files         236      236              
  Lines       28668    28690      +22     
==========================================
  Hits        13102    13102              
- Misses      13772    13794      +22     
  Partials     1794     1794              
Impacted Files Coverage Δ
cmd/argocd/commands/app.go 18.75% <0.00%> (-0.27%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

cmd/argocd/commands/app.go Outdated Show resolved Hide resolved
@crenshaw-dev
Copy link
Collaborator

@danielhelfand if you resolve conflicts, I'll be happy to merge!

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
@danielhelfand
Copy link
Contributor Author

@danielhelfand if you resolve conflicts, I'll be happy to merge!

Thanks again for looking everything over. I have resolved the conflicts.

cmd/argocd/commands/app.go Outdated Show resolved Hide resolved
Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Copy link
Collaborator

@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.

Thanks @danielhelfand!

@crenshaw-dev crenshaw-dev merged commit ca5e4c5 into argoproj:master Oct 1, 2022
ashutosh16 pushed a commit to ashutosh16/argo-cd that referenced this pull request Oct 7, 2022
* feat: argocd app delete apps by label

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: add path to e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: use guestbook path in e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: change operation status assertions in e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: change sync status to synced

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: assert on cli output for err in e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: assert on err not output in e2e test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: ignore error to allow assertion to take place in test

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: assert on Contains instead of Equal

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: swtich args to assert.Contains

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: selector and args should not be used together

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: add app to delete example

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

* fix: return err instead of nil

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>

Signed-off-by: Daniel Helfand <helfand.4@gmail.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.

Can we get -l or --label CLI flag to delete apps by label?
2 participants