Messaging v1beta1 Types#2373
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 |
| ReplyURI *apis.URL `json:"replyURI,omitempty"` | ||
|
|
||
| // ReplyURI is the fully resolved URI for the spec.delivery.deadLetterSink. | ||
| DeadLetterSinkURI *apis.URL `json:"deadLetterSinkURI,omitempty"` |
There was a problem hiding this comment.
the correct json should be deadLetterSinkUri`
Why is the channel error and this deadLetter?
|
Thanks much! So far I think I addressed all the items that I could that I think we can do without some further input. Here's what I see the big ticket items that need resolving. Pulling them here
|
f78c785 to
58f704c
Compare
|
/test pull-knative-eventing-integration-tests |
9bec93a to
fbc0e24
Compare
| // DeadLetterChannel is the reference to the native, platform specific channel | ||
| // where failed events are sent to. | ||
| // +optional | ||
| DeadLetterChannel *corev1.ObjectReference `json:"deadLetterChannel,omitempty"` |
There was a problem hiding this comment.
maybe the type should be api.URL.
There was a problem hiding this comment.
In the status, it should be a reference to a Channel (well, really, Subscribable). That way you can Subscribe to the events that have failed. Make sense?
There was a problem hiding this comment.
I had the same thought until I realized that this really is a ref to a channel that the owning channel created. I am +1 on DeadLetterChannel
There was a problem hiding this comment.
Maybe this object also needs a deadlettersinkuri? If the resource has a delivery spec in the spec there is currently no place to show a resolved delivery deadleattersink.
Or there are two kinds of status objects, one where the channel makes you a deadletter channel, and ones that use the resolved deadletter destination
| // Channelable is a skeleton type wrapping Subscribable and Addressable in the manner we expect resource writers | ||
| // defining compatible resources to embed it. We will typically use this type to deserialize | ||
| // Channelable ObjectReferences and access their subscription and address data. This is not a real resource. | ||
| type Channelable struct { |
There was a problem hiding this comment.
If Delivery moved into Subscribable, then we can drop Channelable all together and a channel becomes
Addressable + Subscribable.
What do you think?
There was a problem hiding this comment.
make sense to me. Big change though....
There was a problem hiding this comment.
Besides removing one duck type (which I kind of think adds clarity), are there other benefits to removing it? I think being able to operate on a Channel ducktype as a single object in the consuming code base is kind of nice (instead of operating on Addressable / Subscribable) separately.
Not against it, just not sure what the concrete benefits of it are.
There was a problem hiding this comment.
sorry, I meant that actually having the Channelable as a separate duck type adds clarity, not removing it. So, what are the benefits for removing it?
There was a problem hiding this comment.
Simplify the number of things, channelable does not add anything new, just the union of two other ducks
There was a problem hiding this comment.
But the code using it now needs to set up two watches if it cares about channels (one for addressable and one for subscribable) and extra serializations / etc.? Am I just confused here? Seems like it has downsides and I'm not seeing the upside of removing the duck.
There was a problem hiding this comment.
Given the discussion above about Delivery NOT moving to Subscribable (since it needs to be available per Subscription) but moving to SubscriberSpec and the fact that there's also a DeadLetterChannel in the Channel, I don't see this happening. But perhaps I'm missing something here? So it's not only Subscribable, Addressable but also has DeadLetterChannel in the status.
40d0d25 to
589f5f5
Compare
|
@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. |
| // SubscribableStatus is the part where SubscribableStatus object is | ||
| // configured as to be compatible with Subscribable contract. | ||
| Status SubscribableTypeStatus `json:"status"` | ||
| Status SubscribableStatus `json:"status"` |
There was a problem hiding this comment.
I still want to question status. Is it really just a quick way to know spec.subscriber[x].generation == status.subscriber[x].generation?
If so, I think it should be removed.
If not, and it is the status of the subscriber, it should be removed because it is not the job of the channel to look up the subscribers.
If it is the status of the data plane result (like, we are getting 2xx's) I also think it should be renamed or rethought because if this is false, it is useless without a reason and message.
There was a problem hiding this comment.
I was thinking it would be that the subscription has been wired up. You asked for a subscription in the Spec, reconciler then goes and makes that, how would you know if something went wrong? But, I'm reading some of the more of the codes now.
There was a problem hiding this comment.
Then maybe you are pro-"add a reason and a message"?
status.subscriber[x].ready: false falls short of being useful info to act on.
There was a problem hiding this comment.
Ack. @n3wscott and I talked offline. So the spec.Array and status.Array has precedent in things like pod (container in spec -> containerstatuses). so using array in spec and array in status to match part is all good. I'll create a more targeted issue for possibly renaming / modifying the fields within the SubscriberStatus struct.
There was a problem hiding this comment.
I created this issue to track this in specific. As we move forward with the implementation of the controller and channels, etc. we will revisit this as part of that issue:
#2416
| // GetListType implements apis.Listable | ||
| func (c *SubscribableType) GetListType() runtime.Object { | ||
| return &SubscribableTypeList{} | ||
| func (c *Subscribable) GetListType() runtime.Object { |
There was a problem hiding this comment.
this reads so much better, nice work.
|
/lgtm |
Addresses #1869
Proposed Changes
Release Note