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

Do not fail when subscription already exists #3776

Merged
merged 1 commit into from
Aug 5, 2020

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Aug 3, 2020

Recently, we added a workaround for EOF errors:
#3681 and some tests seem to be flaky because
we try to create a subscription multiple times when
it already exists.
Some test runs show errors like this:

creation.go:175: Creating v1 subscription
creation.go:180: Failed to create subscription "<name>": conversion webhook for messaging.knative.dev/v1beta1, Kind=Subscription failed: Post https://eventing-webhook.knative-eventing-aw90d392a6.svc:443/resource-conversion?timeout=30s: EOF
creation.go:175: Creating v1 subscription <name> for channel &TypeMeta{Kind:InMemoryChannel,APIVersion:messaging.knative.dev/v1,}-e2e-singleevent-channel-structured
creation.go:180: Failed to create subscription "<name>": subscriptions.messaging.knative.dev "e2e-singleevent-subscription-structured" already exists
creation.go:185: Failed to create subscription "<name>": subscriptions.messaging.knative.dev "e2e-singleevent-subscription-structured" already exists

So, this PR adds a check for already exists errors to
avoid failing tests in those cases.

Signed-off-by: Pierangelo Di Pilato pierangelodipilato@gmail.com

Addresses #3653

Proposed Changes

  • Do not fail when subscription already exists

Recently, we added a workaround for EOF errors:
we try to create a subscription multiple times when
it already exists.
Some test runs show errors like this:
```
creation.go:175: Creating v1 subscription
creation.go:180: Failed to create subscription "<name>": conversion webhook for messaging.knative.dev/v1beta1, Kind=Subscription failed: Post https://eventing-webhook.knative-eventing-aw90d392a6.svc:443/resource-conversion?timeout=30s: EOF
creation.go:175: Creating v1 subscription <name> for channel &TypeMeta{Kind:InMemoryChannel,APIVersion:messaging.knative.dev/v1,}-e2e-singleevent-channel-structured
creation.go:180: Failed to create subscription "<name>": subscriptions.messaging.knative.dev "e2e-singleevent-subscription-structured" already exists
creation.go:185: Failed to create subscription "<name>": subscriptions.messaging.knative.dev "e2e-singleevent-subscription-structured" already exists
```
So, this PR adds a check for already exists errors to
avoid failing tests in those cases.

Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 3, 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 Aug 3, 2020
@slinkydeveloper
Copy link
Contributor

/lgtm
/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pierDipi, slinkydeveloper

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 5, 2020
@knative-prow-robot knative-prow-robot merged commit 6737fef into knative:master Aug 5, 2020
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.

4 participants