Skip to content

Add retries for webhook fails at conformance tests#4045

Merged
knative-prow-robot merged 3 commits into
knative:masterfrom
aliok:retry-conf-test
Sep 15, 2020
Merged

Add retries for webhook fails at conformance tests#4045
knative-prow-robot merged 3 commits into
knative:masterfrom
aliok:retry-conf-test

Conversation

@aliok
Copy link
Copy Markdown
Member

@aliok aliok commented Sep 14, 2020

Fixes #3952

Proposed Changes

  • Add retries for webhook fails at conformance tests
  • Only for conformance test helpers are checked

Release Note


Docs

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 14, 2020
@knative-prow-robot knative-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/test-and-release Test infrastructure, tests or release labels Sep 14, 2020
@aliok
Copy link
Copy Markdown
Member Author

aliok commented Sep 14, 2020

cc @vaikas @pierDipi

I just added the retries to the places I personally thought applicable in conformance test helpers.
Let me know if you think there is still more work here.

@knative-test-reporter-robot
Copy link
Copy Markdown

The following jobs failed:

Test name Triggers Retries
pull-knative-eventing-conformance-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-eventing-conformance-tests:

.Test

}
return err
})
if err != nil {
Copy link
Copy Markdown
Member

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?

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)
}

Suggested change
if err != nil {
if err != nil && !apierrors.IsAlreadyExists(err) {

The same applies for the others below.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member

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

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 15, 2020
Copy link
Copy Markdown
Member

@matzew matzew left a 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

@knative-prow-robot
Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 15, 2020
@knative-prow-robot knative-prow-robot merged commit 65df67d into knative:master Sep 15, 2020
@aliok aliok deleted the retry-conf-test branch September 15, 2020 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add retries for webhook failures.

6 participants