-
Notifications
You must be signed in to change notification settings - Fork 263
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
Handle map-like options consistently #592
Conversation
Hi @MIBc. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
/test pull-knative-client-go-coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
A couple of suggestions to align with similar error messages.
} | ||
filters, err := util.MapFromArray(f.Filters, "=") | ||
if err != nil { | ||
return nil, errors.Wrap(err, "invalid filter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, errors.Wrap(err, "invalid filter") | |
return nil, errors.Wrap(err, "Invalid --filter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
filters, err := util.MapFromArrayAllowingSingles(f.Filters, "=") | ||
if err != nil { | ||
return nil, nil, errors.Wrap(err, "invalid filter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, nil, errors.Wrap(err, "invalid filter") | |
return nil, nil, errors.Wrap(err, "Invalid --filter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thank you!
@rhuss : The PR covers all the cases from #577 except the one, to error out if asked to remove an ENV during create, IMO it could be a valid use case #577 (comment), besides I've updated the PR description to not close the issue.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MIBc, navidshaikh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Update RPM spec file * Update spec file changelog date Co-authored-by: Navid Shaikh <[email protected]> Co-authored-by: Navid Shaikh <[email protected]>
From the description of #577:
The behaviour should be (using --env as an example):
--env a1=b1 --env a2=b2 should add both env variables
--env a1 should set a1 to empty string
--env a1- should remove the environment variable for update and an error for create
--env a1=b1 --env a1=b2 should be an error as the same key can not be specified on the same command line
Implements all the cases mentioned in #577, except one being discussed.