-
Notifications
You must be signed in to change notification settings - Fork 595
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
IMC and Multi-Tenant Channel Based Broker retries #2932
IMC and Multi-Tenant Channel Based Broker retries #2932
Conversation
Hi @pierDipi. 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 Once the patch is verified, the new status will be reflected by the 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. |
/hold let's wait for the next CloudEvent SDK preview release to land. |
Let's keep this on hold, we need to understand if we can use the |
Just a ping on the status of this? |
@vaikas i have no updates, let's check this next week |
What I'm really worried about is that we're adding ourselves code for retrying http requests that already exists out there (which is error prone and we need to test). For example, i'm not really sure what happens in that code if you pass an unbuffered |
382ed6c
to
a2606e0
Compare
No, I didn't, but I'm fine with this Let me know if I can go ahead using that library. |
I think we need somebody else on this topic, @n3wscott wdyt? |
really cool ideas in this library! Thanks for sharing @slinkydeveloper! It is very flexible (BYO backoff policy and retry policy) so from a functional PoV it does what we want. |
I second what @slinkydeveloper said here! Let's use proven and maintained code, instead of hacking /cc @pierDipi |
Ok, I'll continue to work on this. |
a2606e0
to
c8d1375
Compare
c8d1375
to
728436c
Compare
/assign |
Signed-off-by: Pierangelo Di Pilato <[email protected]>
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.
Little hint on the signature of MessageDispatcher
Signed-off-by: Pierangelo Di Pilato <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
The following is the coverage report on the affected files.
|
/retest |
The following jobs failed:
Failed non-flaky tests preventing automatic retry of pull-knative-eventing-integration-tests:
|
Have you ever seen something similar? |
Yeah :( |
Thanks! /retest |
/unhold |
eventingduck "knative.dev/eventing/pkg/apis/duck/v1beta1" | ||
"knative.dev/eventing/pkg/channel" | ||
"knative.dev/eventing/pkg/kncloudevents" | ||
) | ||
|
||
const ( |
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.
Not your doing, but 15 minute timeout? :) I'll look what this is for. Just a note :)
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.
It seems too much :)
It's used here:
eventing/pkg/channel/fanout/fanout_message_handler.go
Lines 175 to 193 in d5ea26f
errorCh := make(chan error, subs) | |
for _, sub := range f.config.Subscriptions { | |
go func(s Subscription) { | |
errorCh <- f.makeFanoutRequest(ctx, bufferedMessage, additionalHeaders, s) | |
}(sub) | |
} | |
for range f.config.Subscriptions { | |
select { | |
case err := <-errorCh: | |
if err != nil { | |
f.logger.Error("Fanout had an error", zap.Error(err)) | |
return err | |
} | |
case <-time.After(f.timeout): | |
f.logger.Error("Fanout timed out") | |
return errors.New("fanout timed out") | |
} | |
} |
) | ||
|
||
const ( | ||
defaultTimeout = 15 * time.Minute | ||
) | ||
|
||
type Subscription struct { | ||
eventingduck.SubscriberSpec | ||
RetriesConfig kncloudevents.RetryConfig |
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.
nit: RetriesConfig => RetryConfig?
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.
Does this also fix / help with: /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pierDipi, vaikas 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 |
It looks like we have the opposite behavior: https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_eventing/2932/pull-knative-eventing-upgrade-tests/1285477487198867458
|
Thanks @pierDipi for looking in this long-standing issue! |
Thanks for your reviews 😄 |
Fixes #2210
Fixes #2212
Proposed Changes
MessageDispatcher
retries sending events.redelivery
feature.Release Note