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

kn source-list types: adding column to specify built-in source #1246

Merged
merged 3 commits into from
Mar 9, 2021

Conversation

eletonia
Copy link
Contributor

@eletonia eletonia commented Mar 2, 2021

Description

kn source list-types currently shows the TYPE, NAME, and DESCRIPTION of available sources.
This PR adds a S column which shows whether the source is built-in or not:

$ kn source list-types
TYPE              S     NAME                                   DESCRIPTION
ApiServerSource   X     apiserversources.sources.knative.dev   Watch and send Kubernetes API events to addressable
ContainerSource   X     containersources.sources.knative.dev   Generate events by Container image and send to addressable
PingSource        X     pingsources.sources.knative.dev        Send periodically ping events to addressable
SinkBinding       X     sinkbindings.sources.knative.dev       Binding for connecting a PodSpecable to addressable

Changes

  • changed human_readable_flags.go to add the new S column
  • list_test.go now checks for S column and appropriate values
  • source_list_test.go e2e test now checks for S column

Reference

Fixes a part of #633 More discussion is needed on how to handle plugin sources.

@google-cla
Copy link

google-cla bot commented Mar 2, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no Indicates the PR's author has not signed the CLA. label Mar 2, 2021
@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 Mar 2, 2021
@knative-prow-robot
Copy link
Contributor

Welcome @eletonia! It looks like this is your first PR to knative/client 🎉

@knative-prow-robot
Copy link
Contributor

Hi @eletonia. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 2, 2021
@google-cla
Copy link

google-cla bot commented Mar 2, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 2, 2021
@eletonia
Copy link
Contributor Author

eletonia commented Mar 2, 2021

@googlebot I fixed it.

@google-cla
Copy link

google-cla bot commented Mar 2, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Mar 2, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@dsimansk
Copy link
Contributor

dsimansk commented Mar 2, 2021

@eletonia thanks for the contribution!

The change looks good at a first glance. However, google-cla bot is confused due to mix of 2 accounts adding commits. It'd better if you could squash all those commits into one under your preferred account.

You can check how to fill the licence agreement for the future contributions.

/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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 2, 2021
@google-cla google-cla bot added cla: yes Indicates the PR's author has signed the CLA. and removed cla: no Indicates the PR's author has not signed the CLA. labels Mar 2, 2021
CHANGELOG.adoc Outdated Show resolved Hide resolved
Copy link
Contributor

@dsimansk dsimansk left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 2, 2021
@eletonia
Copy link
Contributor Author

eletonia commented Mar 2, 2021

/assign @rhuss

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 the contribution. The question is whether this could be done dynamically since as new sources are added and introduced you’ll need to change your hard coded list. Perhaps having a different issue to “upgrade” to that in future could allow this to be merged now and the enhancement done in future. WDYT?

@eletonia
Copy link
Contributor Author

eletonia commented Mar 2, 2021

Details for apiserver, container, ping, and binding are hardcoded in other parts of the code since these are the available subcommands for for kn source:

$ kn source --help
Manage event sources

Usage:
  kn source SOURCE|COMMAND [options]

Aliases: 
  source, sources

Available Commands:
  apiserver   Manage Kubernetes api-server sources
  binding     Manage sink bindings
  container   Manage container sources
  list        List event sources
  list-types  List event source types
  ping        Manage ping sources

In a future issue with plugin support, we can dynamically display the description and source type if it is a plugin as suggested in the comments of this code

@itsmurugappan
Copy link
Contributor

itsmurugappan commented Mar 3, 2021

Thanks for your contribution, couple of things,

  • should the values of this column be "Yes/No" or "BuiltIn/Plugin" ?
  • to keep it simple, anything apart from the built in source could be displayed as plugin (for kafkasource, githubsource etc)

cc @navidshaikh @dsimansk @maximilien

@dsimansk
Copy link
Contributor

dsimansk commented Mar 3, 2021

* should the values of this column be "Yes/No" or "BuiltIn/Plugin" ?
* to keep it simple, anything apart from the built in source could be displayed as plugin (for kafkasource, githubsource etc)

Well, that'd easily imply that such a plugin actually exists to support the source, but it's not necessary true for a lot of eventing sources.

@rhuss
Copy link
Contributor

rhuss commented Mar 4, 2021

Thanks for the PR, looks good in general, but I would be denser to save screen real estate. Also, I think that for the user it is only important whether a source is supported by the client or not, regardless of whether it is built-in or supported via a plugin.

E.g. instead of YES / NO, just use an "X" (and nothing if not builtin), and instead of "BUILT-IN" header, maybe just an "S" letter (or something else), or even no header. Then, I would put that in the second or third column, before the description because this column is of fixed length (ideally only 1 char), while a description can be long and varying in length. In general, the longest possible column should be last because this can be the only one that possible needs not to be truncated when being longer than a certain limit.

@google-cla
Copy link

google-cla bot commented Mar 4, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@dsimansk
Copy link
Contributor

dsimansk commented Mar 4, 2021

@eletonia at least we know it's not my "consent". :)

@eletonia
Copy link
Contributor Author

eletonia commented Mar 4, 2021

Thanks @dsimansk There are no other authors that need to consent. It may have to be manually confirmed:

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

@eletonia
Copy link
Contributor Author

eletonia commented Mar 4, 2021

/retest

@dsimansk
Copy link
Contributor

dsimansk commented Mar 5, 2021

@itsmurugappan could you please try to comment with @googlebot I consent. I think, the merge commit might be confusing cla bot as it brings your changelog update from master branch.

@eletonia I believe for the manual confirmation it needs to be also Googler. It might be quicker to just create a fresh PR. @rhuss any suggestion would be welcome pls?

@google-cla
Copy link

google-cla bot commented Mar 5, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@itsmurugappan
Copy link
Contributor

@googlebot I consent.

@google-cla
Copy link

google-cla bot commented Mar 5, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@rhuss
Copy link
Contributor

rhuss commented Mar 8, 2021

@eletonia @dsimansk the best way is to locally squash everything to a local commit and then do a forced push. Then the googlebot is happy again :)

Alternatively you could of course do a fresh PR but I think the first option might be easier ?

eletonia added 2 commits March 8, 2021 11:09
# This is the 1st commit message:
adding BUILT-IN SOURCE column for kn source list-types

# The commit message knative#2 will be skipped:

#	changing list test to check for BUILT-IN SOURCE column

# The commit message knative#3 will be skipped:

#	changing e2e source list test to check for BUILT-IN SOURCE column

# The commit message knative#4 will be skipped:

#	adding CHANGELOG entry

# The commit message knative#5 will be skipped:

#	kn source list-types: changing BUILT-IN SOURCE to BUILT-IN and moving DESCRIPTION column to the end

# The commit message knative#6 will be skipped:

#	changing BUILT-IN SOURCE to BUILT-IN in changelog

# The commit message knative#7 will be skipped:

#	Update CHANGELOG.adoc
#
#	Co-authored-by: David Simansky <[email protected]>

# The commit message knative#8 will be skipped:

#	kn source list-types: changing column header to S, values to X, and moving to second column

# The commit message knative#9 will be skipped:

#	fixing CHANGELOG merge conflict
@google-cla google-cla bot added cla: yes Indicates the PR's author has signed the CLA. and removed cla: no Indicates the PR's author has not signed the CLA. labels Mar 8, 2021
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 8, 2021
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 8, 2021
@eletonia
Copy link
Contributor Author

eletonia commented Mar 8, 2021

@dsimansk @rhuss Thanks for the suggestion! I squashed my commits and looks like all the tests are passing now

Base automatically changed from master to main March 8, 2021 17:40
@dsimansk
Copy link
Contributor

dsimansk commented Mar 8, 2021

/retest

1 similar comment
@eletonia
Copy link
Contributor Author

eletonia commented Mar 8, 2021

/retest

rhuss added a commit to rhuss/knative-client that referenced this pull request Mar 9, 2021
David meets all criteria for an approver:

- [x] Reviewer for at least 3 months
- [x] Primary reviewer for at least 10 substantial PRs to the codebase, e.g.
  * knative#1246
  * knative#1194
  * knative#738
  * knative#832
  * knative#1016
  * knative#877
  * knative#667
  * knative#697
  * knative#1212
  * knative#835
- [x] Reviewed at least 30 PRs to the codebase ([38 assigned PRs](https://github.com/knative/client/pulls?q=type%3Apr+assignee%3Adsimansk+))
- [x] Nominated by a WG lead (rhuss)

Congrats David ! Thanks a lot for your awesome work & contributions.
@rhuss rhuss mentioned this pull request Mar 9, 2021
4 tasks
rhuss added a commit to rhuss/knative-client that referenced this pull request Mar 9, 2021
David meets all criteria for an approver:

- [x] Reviewer for at least 3 months
- [x] Primary reviewer for at least 10 substantial PRs to the codebase, e.g.
  * knative#1246
  * knative#1194
  * knative#738
  * knative#832
  * knative#1016
  * knative#877
  * knative#667
  * knative#697
  * knative#1212
  * knative#835
- [x] Reviewed at least 30 PRs to the codebase ([38 assigned PRs](https://github.com/knative/client/pulls?q=type%3Apr+assignee%3Adsimansk+))
- [x] Nominated by a WG lead (rhuss)

Congrats David ! Thanks a lot for your awesome work & contributions.
knative-prow-robot pushed a commit that referenced this pull request Mar 9, 2021
David meets all criteria for an approver:

- [x] Reviewer for at least 3 months
- [x] Primary reviewer for at least 10 substantial PRs to the codebase, e.g.
  * #1246
  * #1194
  * #738
  * #832
  * #1016
  * #877
  * #667
  * #697
  * #1212
  * #835
- [x] Reviewed at least 30 PRs to the codebase ([38 assigned PRs](https://github.com/knative/client/pulls?q=type%3Apr+assignee%3Adsimansk+))
- [x] Nominated by a WG lead (rhuss)

Congrats David ! Thanks a lot for your awesome work & contributions.
@dsimansk
Copy link
Contributor

dsimansk commented Mar 9, 2021

Thanks @eletonia! I think it's all good now.
/approve
/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 9, 2021
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2021
@knative-prow-robot knative-prow-robot merged commit a9687c6 into knative:main Mar 9, 2021
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants