-
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
feat(source): Add 'kn source list' #666
feat(source): Add 'kn source list' #666
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.
@navidshaikh: 2 warnings.
In response to this:
/lint
Fixes #480Proposed Changes
- Add 'kn source list' listing the available sources COs
- Use dynamic client to
- find out available source types
- find the COs in given namespace for each source type
➜ client git:(pr/source-list) kn source list NAME TYPE RESOURCE SINK k8sevents ApiServerSource apiserversources.sources.eventing.knative.dev svc:mysvc
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.
Adding another example of |
With 3 additional columns:
|
With only
IMO |
78efb62
to
2381f8b
Compare
Added |
2381f8b
to
1f53d19
Compare
1f53d19
to
c57b36a
Compare
/lint |
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.
@navidshaikh: 2 warnings.
In response to this:
/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.
247fa41
to
4d74e8d
Compare
This is ready for review. |
/test pull-knative-client-integration-tests
|
/retest
On Tue, 18 Feb 2020 at 9:06 PM, Knative Prow Robot ***@***.***> wrote:
@navidshaikh <https://github.com/navidshaikh>: The following test *failed*,
say /retest to rerun all failed tests:
Test name Commit Details Rerun command
pull-knative-client-integration-tests 4d74e8d
<4d74e8d>
link
<https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/666/pull-knative-client-integration-tests/1229785508830253057> /test
pull-knative-client-integration-tests
Full PR test history
<https://gubernator.knative.dev/pr/knative_client/666>. Your PR dashboard
<https://gubernator.knative.dev/pr/navidshaikh>.
Instructions for interacting with me using PR comments are available here
<https://git.k8s.io/community/contributors/guide/pull-requests.md>. If
you have questions or suggestions related to my behavior, please file an
issue against the kubernetes/test-infra
<https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:>
repository. I understand the commands that are listed here
<https://go.k8s.io/bot-commands>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#666?email_source=notifications&email_token=AATE22ACJQRCZ4GBEPFXFN3RDP577A5CNFSM4KVCVIL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMCOBWQ#issuecomment-587522266>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATE22BBJSL7JXWIU3HFEXLRDP577ANCNFSM4KVCVILQ>
.
--
Navid Shaikh
Composed on handheld device.
|
/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.
This a partial review for the API and how the list is fetched. Please find my comments below, I think we could improve the API.
Also what I'm a bit puzzled: Why does return ListSourceTypes
an Unstructured
and not a list CustomResourceDefinitions
(which would make it much easier and type-safer to work with).
/retest |
/test pull-knative-client-integration-tests async revision delete issue |
/retest @navidshaikh there are some codegen errors, too |
/retest --- FAIL: TestSourceApiServer (210.14s) |
@navidshaikh lso codegen error. Guess that somehow sneaked in by a latest merge. |
8e6c66e
to
ab78629
Compare
The following is the coverage report on the affected files.
|
sourceList.SetGroupVersionKind(sList.GetObjectKind().GroupVersionKind()) | ||
} | ||
} | ||
// Clear the Group and Version for list if there are multiple types of source objects found |
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.
👍
t.Log("list sources in YAML format") | ||
output = test.sourceList(t, r, "-oyaml") | ||
assert.Check(t, util.ContainsAll(output, "testapisource1", "ApiServerSource", "Service", "testsvc0")) | ||
|
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 for already adding E2E tests, but maybe we could later enhance them with some more cases:
- Invalid filter option
- Heterogenous list of different types with
-o yaml
(would involve to combine a pingsource + apiserver source creation)
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.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
/lint
Fixes #480
Proposed Changes
apiVersion
andkind
is set to respective source type's objectapiVersion
is set to""
andkind
is toList
.--type
filter is given to subset source objects, the machine readable format setsapiVersion
andList
to respective source's type.Default output:
Using (case insensitive) type filters:
See
kind
andapiVersion
ofList
for machine readable format:--type
filter):