-
Notifications
You must be signed in to change notification settings - Fork 600
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 retries for webhook fails at conformance tests #4045
Conversation
The following jobs failed:
Failed non-flaky tests preventing automatic retry of pull-knative-eventing-conformance-tests:
|
client.T.Logf("Failed to get trigger %q: %v", triggerName, e) | ||
} | ||
return err | ||
}) | ||
if err != nil { |
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.
After retrying we sometimes got an already exists error, can you add a check for that?
Lines 81 to 92 in c5fabfd
var gvr schema.GroupVersionResource | |
err := c.RetryWebhookErrors(func(attempts int) (err error) { | |
var e error | |
gvr, e = duck.CreateGenericChannelObject(c.Dynamic, metaResource) | |
if e != nil { | |
c.T.Logf("Failed to create %q %q: %v", channelTypeMeta.Kind, name, e) | |
} | |
return e | |
}) | |
if err != nil && !errors.IsAlreadyExists(err) { | |
c.T.Fatalf("Failed to create %q %q: %v", channelTypeMeta.Kind, name, err) | |
} |
if err != nil { | |
if err != nil && !apierrors.IsAlreadyExists(err) { |
The same applies for the others below.
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.
I only added retries for GET operations and I don't think we would get that error in this case.
And, all the other operations already have retries.
Let me know what you think @pierDipi
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 sounds good, thanks!
/lgtm
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.
thanks, Ali
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, matzew 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 |
Fixes #3952
Proposed Changes
Release Note
Docs