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: cleanup argocd unknown flag errors (#8625) #8723

Merged
merged 1 commit into from
Mar 19, 2022

Conversation

danielhelfand
Copy link
Contributor

Closes #8625

This pull request makes errors from unknown flags easier to locate and removes a duplicate display of the error message.

Not sure if there are further considerations around removing the print of the error from main.go, but this can definitely be amended to make this skipping of the additional error print specific to the argocd cli.

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

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

* Remove extra print of error message
* Enable SilenceUsage to not display full help message with error

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

codecov bot commented Mar 9, 2022

Codecov Report

Merging #8723 (5d7396d) into master (5a50219) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8723      +/-   ##
==========================================
- Coverage   42.65%   42.64%   -0.02%     
==========================================
  Files         183      183              
  Lines       22972    22972              
==========================================
- Hits         9799     9796       -3     
- Misses      11790    11792       +2     
- Partials     1383     1384       +1     
Impacted Files Coverage Δ
cmd/argocd/commands/root.go 2.08% <ø> (ø)
controller/cache/cache.go 19.80% <0.00%> (-0.96%) ⬇️
util/settings/settings.go 47.91% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a50219...5d7396d. Read the comment docs.

@danielhelfand danielhelfand changed the title fix: cleanup argocd unknown flag errors (Fix #8625) fix: cleanup argocd unknown flag errors (#8625) Mar 9, 2022
@pasha-codefresh
Copy link
Member

Before:

Снимок экрана 2022-03-19 в 11 51 11

After:
Снимок экрана 2022-03-19 в 11 53 07

Copy link
Member

@pasha-codefresh pasha-codefresh left a comment

Choose a reason for hiding this comment

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

Thank you !

@pasha-codefresh pasha-codefresh merged commit 9186bad into argoproj:master Mar 19, 2022
wojtekidd pushed a commit to wojtekidd/argo-cd that referenced this pull request Apr 25, 2022
* Remove extra print of error message
* Enable SilenceUsage to not display full help message with error

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
Signed-off-by: wojtekidd <wojtek.cichon@protonmail.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.

cli: unknown flag errors cleanup
2 participants