-
Notifications
You must be signed in to change notification settings - Fork 261
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
Add -a flag as alias for --annotation #782
Conversation
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.
@duglin: 0 warnings.
In response to this:
I find that I'm using annotations more and more and since
-a
wasn't being used I decided we should save people from typing too muchSigned-off-by: Doug Davis [email protected]
Changes
- add support for
-a
as an alias for--annotation
/lint
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.
We also have other flags starting with @duglin : should auto-completion help here? |
Yep - it's a bit of a guessing game, and popularity contest. I don't think it's confusing though since people learn quickly what works. But, as of now, of all the |
docs/cmd/kn_service_create.md
Outdated
@@ -45,7 +45,7 @@ kn service create NAME --image IMAGE [flags] | |||
### Options | |||
|
|||
``` | |||
--annotation stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). | |||
-a, --annotation stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). |
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.
Im fine with that (except maybe that it can be easily confused with -A
which is "for all namespaces")
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.
on the other hand, why not -a
for --arg
?
But as we already have -e
and -l
, for consistencies sake I'm fine with -a
(but in general we should take care to give away single letter options not easily)
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.
I think --annotation would be used more than --arg, plus "arg" is shorter than "annotation" - so between the two I don't think "arg" needs as much UX help :-)
As for -A and -a .... not sure what to say, other than these things are case sensitive for a reason.
After no objections from the latest WG call, lets merge this PR. Thanks, @duglin ! /lgtm |
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.
There are some test errors, probably because of some e2e test refactorings.
Also, could you please an an entry to the CHANGELOG.adoc as well to reflect this change ?
serviceUpdate(t, it, r, "svc3", "-a", "alpha=direwolf", "-a", "brave-") | ||
validateServiceAnnotations(t, it, r, "svc3", map[string]string{"alpha": "direwolf", "brave": ""}) | ||
serviceDelete(t, it, r, "svc3") | ||
|
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.
You probably have to adapt this part to fit the refactoring landed recently (that's why the build tests are failing)
@rhuss fixed testing issues |
Added an entry to the change log too - I think it's all ready now |
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 !
/lgtm
/approve
/lgtm |
/retest Still looks like a flake |
5094df2
to
cf39cd6
Compare
/hold I'm doing some testing to see why the tests are failing |
I find that I'm using annotations more and more and since `-a` wasn't being used I decided we should save people from typing too much Signed-off-by: Doug Davis <[email protected]>
/hold cancel |
/retest |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: duglin, navidshaikh, rhuss 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 |
I find that I'm using annotations more and more and since
-a
wasn't being used I decided we should save people from typing too much
Signed-off-by: Doug Davis [email protected]
Changes
-a
as an alias for--annotation
/lint