Eventing v1 api#3372
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vaikas The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The following jobs failed:
Failed non-flaky tests preventing automatic retry of pull-knative-eventing-upgrade-tests: |
|
I had a PR for types only (#3368), but I compared the branches and your branch does more things 😄 I am closing mine and I will contribute to yours. |
| ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \ | ||
| knative.dev/eventing/pkg/client knative.dev/eventing/pkg/apis \ | ||
| "eventing:v1beta1 messaging:v1beta1 flows:v1beta1 sources:v1alpha1 sources:v1alpha2 duck:v1alpha1 duck:v1beta1 duck:v1 configs:v1alpha1" \ | ||
| "eventing:v1beta1 eventing:v1 messaging:v1beta1 flows:v1beta1 sources:v1alpha1 sources:v1alpha2 duck:v1alpha1 duck:v1beta1 configs:v1alpha1" \ |
There was a problem hiding this comment.
Did you delete duck:v1 on purpose here?
There was a problem hiding this comment.
nope, mistake :) Thanks!
|
/assign |
| corev1 "k8s.io/api/core/v1" | ||
|
|
||
| eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1" | ||
| messagingv1beta1 "knative.dev/eventing/pkg/apis/messaging/v1beta1" |
There was a problem hiding this comment.
/hold
FYI, messaging v1 is on its way by @nlopezgi.
Feel free to unhold if you think we can merge with messaging v1beta1
There was a problem hiding this comment.
Yeah, this is just for tests, and really the type doesn't change, so I think we're ok. Let's see :)
| // +genclient | ||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
There was a problem hiding this comment.
| // +genclient | |
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | |
| // +genclient | |
| // +genreconciler:krshapedlogic=true | |
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object |
v1beta1 api has // +genreconciler:krshapedlogic=true. Why we don't need it here?
There was a problem hiding this comment.
Ah, it's only cause I didn't yet use it. Changed 👍
|
|
||
| func TestTriggerConversionBadType(t *testing.T) { | ||
| good, bad := &Trigger{}, &Trigger{} | ||
| good, bad := &Trigger{}, &Broker{} |
There was a problem hiding this comment.
There's not much value in this conversion test and other conversion tests for other types unless we add a test for good conversion case as well.
You didn't have to change the &Trigger to &Broker above to make the conversion fail and tests pass. That's what I mean why there's not much value.
But, let's ignore this for now and I am interested in having proper conversion tests in a later PR.
|
Thanks, I think I addressed all the issues, PTAL :) |
|
@vaikas, I created an issue sometime back to improve the EventType object #2750. I haven't had the time to go ahead and focus on this, but I will in this upcoming quarter. Hope to start sometime in the next two weeks. I'm saying this because I think we still need to do some improvements to the discoverability bits enabled by EventType. I had some discussions before my leave with @n3wscott and we were thinking of maybe moving spec.broker and spec.source to status fields, and probably make them lists, otherwise we are creating a different EventType for each different CE source, and the cardinality will blow up. I was interested in also advertising the extensions an EventType can provide, etc... If you can hold off the move of EventType to v1, it'd be great. I'm planning to actively work on it, although it surely won't make the cut to this upcoming release. This has always been a contentious topic... WDYT |
|
@nachocano sure thing, I'll yank that. Stay tuned :) |
Thanks a bunch! |
|
/lgtm |
|
@aliok are you fine with removing the hold now? |
|
@vaikas: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/lgtm |
|
/unhold |
* new types, codegen * ducks to v1 * add types, boilerplate conversion * moar v1beta1->v1 manual conversion * fix pr comments * remove eventtypes
Addresses #3337
Proposed Changes
Release Note
Docs
knative/docs#2609