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

Add support for Eventing/v1beta2 EventTypes #1829

Closed
wants to merge 2 commits into from

Conversation

dsimansk
Copy link
Contributor

Description

Changes

  • 🎁 New Add support for Eventing/v1beta2 EventTypes

Reference

Fixes #1818

/cc @matzew @rhuss

Release Note

Add support for Eventing/v1beta2 EventTypes

@knative-prow knative-prow bot requested review from matzew and rhuss July 20, 2023 11:08
@knative-prow
Copy link

knative-prow bot commented Jul 20, 2023

[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 knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2023
Copy link

@knative-prow knative-prow bot left a comment

Choose a reason for hiding this comment

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

@dsimansk: 1 warning.

In response to this:

Description

Changes

  • 🎁 New Add support for Eventing/v1beta2 EventTypes

Reference

Fixes #1818

/cc @matzew @rhuss

Release Note

Add support for Eventing/v1beta2 EventTypes

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/flags/sink.go Show resolved Hide resolved
@knative-prow knative-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 20, 2023
@@ -25,6 +25,6 @@ type EventtypeFlags struct {
func (e *EventtypeFlags) Add(cmd *cobra.Command) {
cmd.Flags().StringVarP(&e.Type, "type", "t", "", "Cloud Event type")
cmd.Flags().StringVar(&e.Source, "source", "", "Cloud Event source")
cmd.Flags().StringVarP(&e.Broker, "broker", "b", "", "Cloud Event broker")
cmd.Flags().StringVarP(&e.Broker, "broker", "b", "", "Cloud Event Broker. This flag is added for the convenience, since Eventing v1beta2 brokers as represented as KReference type.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this clarification is more confusing than it helps. I don't think that the user know ad hoc what a "KReference type" is. For the help message it would be better to use something like "Deprecated. Please use --reference instead", or if its not deprecated, I just would keep it as is. Anything else is just confusing,.

"You can specify a broker, channel, or fully qualified GVK resource. " +
"Examples: '" + flag + " broker:nest' for a broker 'nest', " +
"'" + flag + " channel:pipe' for a channel 'pipe'."
//TODO: craft fqdn GVK example.
Copy link
Contributor

Choose a reason for hiding this comment

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

Important to not forget it here, since using a GVK is the most complex way to specify this reference so there should be an example for sure.

Copy link
Contributor Author

@dsimansk dsimansk Jul 20, 2023

Choose a reason for hiding this comment

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

From my e2e tests it seems there's an issue with GVK. At least it's not working for EventTypes. I'll be certainly taking a bit in-depth look. I'd say we have a bug there. :)

@rhuss
Copy link
Contributor

rhuss commented Jul 20, 2023

Looks straightforward to me. I've added some comments to the wording.

I wonder whether we should make --broker deprecated? But I don't think we should do it, as you mentioned, it's quite convenient.

@dsimansk
Copy link
Contributor Author

Looks straightforward to me. I've added some comments to the wording.

I wonder whether we should make --broker deprecated? But I don't think we should do it, as you mentioned, it's quite convenient.

I'd prefer to keep it untouched. Even deprecating will take time to remove it completely, but for the sake of convenience it's still handy for most common use case.

Comment on lines +59 to +62
"'" + flag + " special.eventing.dev/v1alpha1/channels:pipe' for GroupVersionResource of v1alpha1 'pipe'. " +
"GroupVersionResource requires resource name in a lower case plural form. The inputs are sanitized on best effort basis, " +
"but in case of 'resource not found' error it may help to double check and correct the input. " +
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rhuss that's the case size is a culprit of my initial "bug" hunch. Can you please take a look at wording since you're master writer please?

@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Patch coverage: 82.67% and project coverage change: -0.06 ⚠️

Comparison is base (3ecb24f) 79.73% compared to head (210841f) 79.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1829      +/-   ##
==========================================
- Coverage   79.73%   79.67%   -0.06%     
==========================================
  Files         179      179              
  Lines       13898    13952      +54     
==========================================
+ Hits        11081    11116      +35     
- Misses       2054     2069      +15     
- Partials      763      767       +4     
Impacted Files Coverage Δ
pkg/kn/commands/eventtype/eventtype.go 100.00% <ø> (ø)
pkg/kn/commands/eventtype/create.go 76.31% <65.71%> (-11.19%) ⬇️
pkg/kn/commands/flags/sink.go 81.41% <68.96%> (-4.73%) ⬇️
pkg/eventing/v1beta2/client_mock.go 94.28% <93.75%> (ø)
pkg/eventing/v1beta2/client.go 85.00% <100.00%> (ø)
pkg/kn/commands/broker/delivery_option_flags.go 100.00% <100.00%> (ø)
pkg/kn/commands/completion_helper.go 85.54% <100.00%> (ø)
pkg/kn/commands/eventtype/delete.go 80.64% <100.00%> (ø)
pkg/kn/commands/eventtype/describe.go 81.25% <100.00%> (+2.30%) ⬆️
pkg/kn/commands/eventtype/list.go 80.26% <100.00%> (ø)
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dsimansk
Copy link
Contributor Author

/test all

@dsimansk
Copy link
Contributor Author

/retest

@knative-prow
Copy link

knative-prow bot commented Jul 21, 2023

@dsimansk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
integration-tests-latest-release_client_main 11008d1 link true /test integration-tests-latest-release
build-tests_client_main 210841f link true /test build-tests

Your PR dashboard.

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. I understand the commands that are listed here.

@dsimansk
Copy link
Contributor Author

It seems very strange that build-tests_client_main keeps failing without any meaningful error being reported. I'll close this PR and try to create a fresh one, it seems like something is out sync in Prow for some reason.

@dsimansk
Copy link
Contributor Author

/close

@knative-prow knative-prow bot closed this Jul 21, 2023
@knative-prow
Copy link

knative-prow bot commented Jul 21, 2023

@dsimansk: Closed this PR.

In response to this:

/close

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.

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. 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.

CLI: Add support for EventType v1beta2
2 participants