-
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
Fix Panic for kn source apiserver and kn source binding describe with Sink URI #901
Fix Panic for kn source apiserver and kn source binding describe with Sink URI #901
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.
@danielhelfand: 0 warnings.
In response to this:
Description
Following up on #848 and #900, this pull request updates
kn source apiserver
andkn source binding describe
to avoid a panic when using a Sink that has a URI instead of a Ref.This pull request also updates unit tests for
apiserver
andbinding
as some tests are not asserting whether output of commands is correct./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.
Hi @danielhelfand. 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. |
22891d6
to
2410198
Compare
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.
See comments. Lacks tests coverage.
/ok-to-test |
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.
added a few minor nits but rest lgtm
sinkRefsvc1 = duckv1.Destination{ | ||
Ref: &duckv1.KReference{ | ||
Kind: "Service", | ||
Name: "svc1", | ||
APIVersion: "serving.knative.dev/v1", | ||
Namespace: "default", | ||
}, | ||
} | ||
|
||
sinkRefsvc2 = duckv1.Destination{ | ||
Ref: &duckv1.KReference{ | ||
Kind: "Service", | ||
Name: "svc2", | ||
APIVersion: "serving.knative.dev/v1", | ||
Namespace: "default", | ||
}, | ||
} |
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.
how about function sinkv1(service, namespace, string)
and use that inline wherever needed ?
(could be done in a follow up)
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 have added a createSinkv1
func in apiserver_test.go
. Turns out this same func exists for binding already as createServiceSink
. If there is a location to recommend, we could use the same func for both, but let me know what's preferred with regard to that.
The following is the coverage report on the affected files.
|
/test pull-knative-client-integration-tests |
Please address @navidshaikh comments. Otherwise LGTM |
Should all be addressed, but can wait for @navidshaikh to clarify if I've missed anything. |
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
thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielhelfand, 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 |
Description
Following up on #848 and #900, this pull request updates
kn source apiserver
andkn source binding describe
to avoid a panic when using a Sink that has a URI instead of a Ref.This pull request also updates unit tests for
apiserver
andbinding
as some tests are not asserting whether output of commands is correct./lint