Skip to content

chore: cleanup err check in conformance tests#1745

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
mlavacca:cleanup-not-found-error
Feb 21, 2023
Merged

chore: cleanup err check in conformance tests#1745
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
mlavacca:cleanup-not-found-error

Conversation

@mlavacca
Copy link
Copy Markdown
Member

@mlavacca mlavacca commented Feb 20, 2023

What type of PR is this?

What this PR does / why we need it:

The cleanup might be failing because some resources were already previously deleted. For example, the tests gateway-secret-reference-grant-specific and gateway-secret-reference-grant-all-in-namespaces create a gateway named in the same way (i.e., the second apply is an update), but the cleaner is called twice. When the cleaner is called the 2nd time on that resource, the cleanup fails because the gateway does not exist anymore, making the test fail.
This PR introduces a check on the error triggered by the cleanup function. If NotFound, the cleanup error can be tolerated.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

NONE

The error triggered by the test cleaner makes the test fail only if the
error is !NotFound.

Signed-off-by: Mattia Lavacca <[email protected]>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 20, 2023
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 20, 2023
@mlavacca mlavacca changed the title chore: cleanup err check scoped down chore: cleanup err check in conformance tests Feb 20, 2023
Copy link
Copy Markdown
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thanks!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2023
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mlavacca, shaneutt

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2023
@shaneutt shaneutt added this to the v0.6.2 milestone Feb 21, 2023
@k8s-ci-robot k8s-ci-robot merged commit e38089f into kubernetes-sigs:main Feb 21, 2023
shaneutt pushed a commit to shaneutt/gateway-api that referenced this pull request Mar 14, 2023
…nd-error

chore: cleanup err check in conformance tests
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants