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

OCM-6646 | fix: detect presence of --help processing args #1839

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thomasmckay
Copy link
Contributor

No description provided.

Copy link
Contributor

openshift-ci bot commented Mar 12, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: thomasmckay
Once this PR has been reviewed and has the lgtm label, please assign oriadler for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 21.30%. Comparing base (7e77d47) to head (a143544).
Report is 210 commits behind head on master.

Files Patch % Lines
pkg/arguments/arguments.go 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1839      +/-   ##
==========================================
- Coverage   21.30%   21.30%   -0.01%     
==========================================
  Files          91       93       +2     
  Lines       15621    15753     +132     
==========================================
+ Hits         3328     3356      +28     
- Misses      12052    12157     +105     
+ Partials      241      240       -1     

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

@hunterkepley
Copy link
Contributor

LGTM,
only concern is if it will print the help for the subcommands (such as rosa list --help vs rosa list clusters --help

@ciaranRoche
Copy link
Member

foundId := false
for i, arg := range argv {
switch {
// If help is called, regardless of other flags, return we want help.
// Also say we need help if the command isn't runnable.
case arg == "--help":
Copy link
Contributor

Choose a reason for hiding this comment

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

@thomasmckay Could you please update arguments_test.go with a unit test for this.

cheers,
Rob

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated tests, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

@thomasmckay I don't see the update tests file in the commits for this PR?

@thomasmckay
Copy link
Contributor Author

LGTM, only concern is if it will print the help for the subcommands (such as rosa list --help vs rosa list clusters --help

it does work for this case

@thomasmckay
Copy link
Contributor Author

@thomasmckay can you ensure the ticket meets the JIRA definition of ready - https://docs.google.com/document/d/1UxSahjnmt4Ovj9y2hxcJt082j8KvJLC7CTfLKSs4HMA/edit#bookmark=id.rgd3xpx7hk0c

added priority and story points to jira

Copy link
Contributor

openshift-ci bot commented Apr 22, 2024

@thomasmckay: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ciaranRoche
Copy link
Member

@thomasmckay just bumping this, can you commit the tests so we can merge this 🙏

@ciaranRoche
Copy link
Member

@thomasmckay another bump on this one 🙏

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.

None yet

4 participants