-
Notifications
You must be signed in to change notification settings - Fork 48
Add timeout to the delivery spec #15
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
Conversation
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| | `deadLetterSink` | [`duckv1.Destination`](#duckv1.Destination) | Optional | The sink receiving event that could not be sent to a `Destination`. | | | ||
| | `retry` | `int` | Optional | The minimum number of retries the sender should attempt when sending an event before moving it to the dead letter sink (when specified) or discarded (otherwise). | | | ||
| | `backoffPolicy` | `string` | Optional | The retry backoff policy (`linear` or `exponential`). | | | ||
| | `timeout` | `string` | Optional | The timeout of each single request. | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this is a behaviour change for Brokers (all implementations), Triggers, Channels (all implementations), Subscriptions, Sequence, and Parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to say what happens if we hit the timeout? e.g. what should be the error seen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a timeout per attempt (eg like an http timeout) or the total time you hold on to the event including all retries?
|
I am not a Eventing WG lead, but I feel like this is a large change too close to when we are trying to ship a v1 eventing. Adding this will break a ton of out of tee implementations (channels and brokers). |
|
I think this is an important API change, but on the other hand this is trivially implementable and requested by a user. I'm even inclined to say that this is more a bug fix than a new feature, given that setting the timeout is quite an important delivery feature, more than the retries. I don't agree with the idea that we should stop improving our APIs now, even more because we're going v1 and we want to make sure we support a broad range of use cases and the UX is nice. This won't break implementations at all, it will just add a field that some implementation won't support temporarily. There are some fields that right now even our reference implementation doesn't fully support/implement , eg |
|
I'd say, adding this is IMO very important before we ship a |
|
I think both lines of reasonings (API convergence vs. importance to have individual timeouts) are definitely valid, so it's really a tradeoff. My take is because it is a perfect backwards-compatible update it feels like it is safe to add still to V1. The following potential issues should be carefully considered IMO:
I think the naming is future-proof, but I can't really assess the other concerns. But my feeling is, adding it as an optional field would be a good compromise. |
Delivery spec is a mandatory part of the spec to support for every broker and channel implementation. So all these components already support retries, backoff delay etc, they all just set a default timeout.
I don't think so?
I don't understand what do you mean by this. This field came out from a user request, and I care about making users happy, in particular when they have a very valid request like this one, no matter if we're releasing 1.0 or 0.0.1, so when you say "creating a precedent" I feel like you're looking at it from the wrong POV.
If your meaning of optional is "an implementation can decide to not support it", then this field is not optional. Implementations that doesn't support it will just ignore it for the moment. But all implementations must support DeliverySpec, hence they'll have to support this field. In other words, it won't break, but it must be implemented at some point. In general, we don't have a way in eventing to say "this field is optional for an implementer to support". |
I mean, when there has been already some (user-driven) feature requests like this waiting to be implemented before 1.0 and has been rejected because of 1.0 convergence concerns, then adding the timeout would be a precedent. Not sure whether this is the case though (e.q. if such features exist that has been rejected).
I don't agree here. For a feature to be added in rush before such an important milestone, it must be carefully considered how it impacts that milestone. There needs to be a time span between 'api change freeze' and hardening / releasing the API IMO. If the change request comes after this freeze (which might have happened implicitly, according to the discussion that I'm aware of), then the feature request must not only be valid but also of highest priority to break that feature-silent time. My question is, whether a delivery timeout qualifies for this urgency (and whether we are already in this hard convergence phase). |
There is no such agreement or public discussion about an eventual api change freeze period. That's why I'm proposing to go ahead and merge this PR. |
|
@slinkydeveloper: PR needs rebase. 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. |
|
@slinkydeveloper can you please rebase this? |
|
@lionelvillard what are you thoughts on the idea of this feature in general? |
|
IMHO this is an important feature, easy to implement (most of it is already implemented, if not everything). so +1 to including it |
|
is someone going to drive/own this since slinky has moved on? |
|
I can drive this. /assign |
|
@lionelvillard rebase needed |
|
closing in favor of #76 (to avoid CLA problems) |
|
/close |
|
@lionelvillard: Closed this PR. DetailsIn response to this:
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. |
Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Signed-off-by: Francesco Guardiani francescoguard@gmail.com
Added timeout to the delivery spec. For more details: knative/eventing#5149