-
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
adding annotation-service and annotation-revision to kn service create/update #1029
adding annotation-service and annotation-revision to kn service create/update #1029
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.
@arghya88: 0 warnings.
In response to this:
Description
Add "--annotation-service" and "--annotation-revision" flag to to kn service create and update providing ability to set specific annotations on service and revision
Changes
- Add "--annotation-service" and "--annotation-revision" to kn service create/update
Reference
Fixes #1014
/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.
Welcome @arghya88! It looks like this is your first PR to knative/client 🎉 |
Hi @arghya88. 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. |
/assign @sixolet |
Thanks looks good @arghya88 ! Could you please take a look on unit and e2e tests to add coverage for those specific flags? /ok-to-test |
14fd953
to
6ae5fec
Compare
6ae5fec
to
cc75a22
Compare
/retest |
cc75a22
to
a0ead62
Compare
/retest |
1 similar comment
/retest |
549e9d5
to
d3cff08
Compare
/retest |
1 similar comment
/retest |
11131ff
to
47f78ed
Compare
/retest |
47f78ed
to
451faf1
Compare
/retest |
2 similar comments
/retest |
/retest |
451faf1
to
8a62501
Compare
/retest |
2 similar comments
/retest |
/retest |
this test needs fix log:ref
|
8a62501
to
ab6c073
Compare
The following is the coverage report on the affected files.
|
/retest
|
/retest |
1 similar comment
/retest |
/retest phew...
|
/retest |
1 similar comment
/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
added a suggestion to update error message, which can be done in a subsequent PR
|
||
for key, value := range annotationServiceFlagMap { | ||
if strings.HasPrefix(key, autoscaling.GroupName) { | ||
return fmt.Errorf("Service cannot have annotation: %s", key) |
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 fmt.Errorf("Service cannot have annotation: %s", key) | |
return fmt.Errorf("service can not have auto-scaling related annotation: %s , please update using '--annotation-revision'", key) |
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.
can be done in a subsequent PR
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.
Sure...I will create a new follow up PR to address this.
"--annotation-service", autoscaling.InitialScaleAnnotationKey+"=1", | ||
"--no-wait", "--revision-name=") | ||
assert.Assert(t, err != nil) | ||
assert.Assert(t, util.ContainsAll(output, "Service cannot have annotation: autoscaling.knative.dev/initialScale")) |
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.
the error message would need update following aforementioned suggestion
(also ContainsAll
can work with array of words, so we should check presence of the words in the error message than the complete sentence)
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.
Will take care of this in the new follow up PR.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: arghya88, 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 |
/test pull-knative-client-integration-tests-latest-release |
/retest
|
Description
Add "--annotation-service" and "--annotation-revision" flag to to kn service create and update providing ability to set specific annotations on service and revision
Changes
Reference
Fixes #1014
/lint