Skip to content
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: List available channel types #1027

Merged

Conversation

Kaustubh-pande
Copy link
Contributor

Description

List available channel types in the cluster which can be used for creating channels.

Changes

Add channel list-types

Reference

Fixes #979

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kaustubh-pande: 2 warnings.

In response to this:

Description

List available channel types in the cluster which can be used for creating channels.

Changes

Add channel list-types

Reference

Fixes #979

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.

pkg/kn/commands/channel/list_types.go Show resolved Hide resolved
lib/test/channel.go Show resolved Hide resolved
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 23, 2020
@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 23, 2020
@knative-prow-robot
Copy link
Contributor

Hi @Kaustubh-pande. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@knative-prow-robot knative-prow-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 23, 2020
Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contribution. Will do a full review. Let’s get the tests running first.

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 24, 2020
Copy link
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, but would love to have some review from @navidshaikh , too, as he did the source list-types (and this here is quite similar).

My only suggestion would be whether we might want reconsider the list-types name to simplify to types (although this would break our noun verb schema) But see the comment below.

@@ -31,4 +31,5 @@ kn channel COMMAND
* [kn channel delete](kn_channel_delete.md) - Delete a channel
* [kn channel describe](kn_channel_describe.md) - Show details of a channel
* [kn channel list](kn_channel_list.md) - List channels
* [kn channel list-types](kn_channel_list-types.md) - List channel types
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While just thinking about this, why not just kn channel types ? I know this violates the schema, but it looks imo nice (same for kn source list-types). At the end "list-types" is also not a verb but an artificial word construct.
wdyt @navidshaikh @maximilien ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I liked that. I'd keep it list-types for this PR and change for source and channel together in a subsequent PR (keeping list-types as an alias for source). cc @Kaustubh-pande

@@ -26,6 +26,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
dynamicfake "k8s.io/client-go/dynamic/fake"
eventingv1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1"
messagingv1beta1 "knative.dev/eventing/pkg/apis/messaging/v1beta1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether we should already go to v1 API (and then change eventing also to v1 in a subsequent PR).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets keep it at v1beta1 to also support working with earlier eventing installs?

@daisy-ycguo
Copy link
Member

/assign daisy-ycguo

pkg/dynamic/client.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat! There are a few suggestion as to which fields to print in the columns, we can remove Group and Version columns, and replace them with NAME and DESCRIPTION to align with kn source list-types.

pkg/dynamic/client.go Outdated Show resolved Hide resolved
@@ -26,6 +26,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
dynamicfake "k8s.io/client-go/dynamic/fake"
eventingv1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1"
messagingv1beta1 "knative.dev/eventing/pkg/apis/messaging/v1beta1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets keep it at v1beta1 to also support working with earlier eventing installs?

pkg/kn/commands/channel/flags.go Outdated Show resolved Hide resolved
pkg/kn/commands/channel/flags.go Outdated Show resolved Hide resolved
test/e2e/channels_test.go Outdated Show resolved Hide resolved
Copy link
Member

@daisy-ycguo daisy-ycguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, @Kaustubh-pande. I have a few comments. Would you address them and update a new version ?

pkg/dynamic/client.go Outdated Show resolved Hide resolved
pkg/messaging/v1beta1/client.go Show resolved Hide resolved
pkg/kn/commands/channel/flags.go Outdated Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 2, 2020
@Kaustubh-pande
Copy link
Contributor Author

/retest

1 similar comment
@Kaustubh-pande
Copy link
Contributor Author

/retest

@knative-prow-robot knative-prow-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 6, 2020
@Kaustubh-pande
Copy link
Contributor Author

/retest

Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just a minor nit for the error message and please add the CHANGELOG entry ?

pkg/kn/commands/channel/list_types.go Outdated Show resolved Hide resolved
@daisy-ycguo
Copy link
Member

/test pull-knative-client-integration-tests

Copy link
Member

@daisy-ycguo daisy-ycguo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
After tests pass, I'm OK to merge it. Thank you for your contribution.

Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2020
@navidshaikh navidshaikh changed the title List available channel types feat: List available channel types Oct 6, 2020
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 6, 2020
@knative-prow-robot knative-prow-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 6, 2020
@rhuss
Copy link
Contributor

rhuss commented Oct 6, 2020

/retest

@rhuss rhuss closed this Oct 6, 2020
@rhuss rhuss reopened this Oct 6, 2020
@rhuss
Copy link
Contributor

rhuss commented Oct 6, 2020

/retest

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/dynamic/client.go 88.9% 88.5% -0.4
pkg/dynamic/client_mock.go 90.9% 92.9% 1.9
pkg/kn/commands/channel/channel.go 57.1% 59.1% 1.9
pkg/kn/commands/channel/flags.go 53.5% 66.2% 12.7
pkg/kn/commands/channel/list_types.go Do not exist 81.1%

@rhuss
Copy link
Contributor

rhuss commented Oct 6, 2020

   ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
        🦆 kn service update svc3 --annotation alpha=direwolf --annotation brave- --namespace kne2etests7
        ┃ Updating Service 'svc3' in namespace 'kne2etests7':
        ┃ 
        ┃   0.045s The Configuration is still working to reflect the latest desired specification.
        ┃   0.404s Ingress reconciliation failed
        ┃ 
        🔥 Error: ReconcileIngressFailed: Ingress reconciliation failed
        🔥 Run 'kn --help' for usage
        🔥 

/retest

@navidshaikh
Copy link
Collaborator

/retest

  result_collector.go:75: ERROR: Error: ReconcileIngressFailed: Ingress reconciliation failed

Copy link
Collaborator

@navidshaikh navidshaikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 6, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: daisy-ycguo, Kaustubh-pande, maximilien, 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:
  • OWNERS [maximilien,navidshaikh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhuss
Copy link
Contributor

rhuss commented Oct 6, 2020

/retest

@knative-prow-robot knative-prow-robot merged commit d9d5234 into knative:master Oct 6, 2020
rhuss pushed a commit to rhuss/knative-client that referenced this pull request Oct 12, 2020
* add channel list-types

* add kn channel list-types doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kn channel list-types
8 participants