Skip to content
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

Retry on webhook errors in rekt tests #5892

Closed
pierDipi opened this issue Nov 11, 2021 · 0 comments · Fixed by knative-extensions/reconciler-test#260
Closed

Retry on webhook errors in rekt tests #5892

pierDipi opened this issue Nov 11, 2021 · 0 comments · Fixed by knative-extensions/reconciler-test#260
Assignees
Labels
area/test-and-release Test infrastructure, tests or release kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@pierDipi
Copy link
Member

pierDipi commented Nov 11, 2021

Describe the bug

We have a workaround for knative/pkg#1509 in the
existing eventing testing library that is currently not used in rekt:

// This is a workaround for https://github.com/knative/pkg/issues/1509
// Because tests currently fail immediately on any creation failure, this
// is problematic. On the reconcilers it's not an issue because they recover,
// but tests need this retry.
//
// https://github.com/knative/eventing/issues/3681
func isWebhookError(err error) bool {
return strings.Contains(err.Error(), "eventing-webhook.knative-eventing")
}
func (c *Client) RetryWebhookErrors(updater func(int) error) error {
attempts := 0
return retry.OnError(retry.DefaultRetry, isWebhookError, func() error {
err := updater(attempts)
attempts++
return err
})
}

Expected behavior

Mitigation for knative/pkg#1509

To Reproduce

N/A

Knative release version

Additional context

/area test-and-release

@pierDipi pierDipi added the kind/bug Categorizes issue or PR as related to a bug. label Nov 11, 2021
@knative-prow-robot knative-prow-robot added the area/test-and-release Test infrastructure, tests or release label Nov 11, 2021
@pierDipi pierDipi added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Nov 11, 2021
@pierDipi pierDipi self-assigned this Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release Test infrastructure, tests or release kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants