-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Fix flaky crd e2e tests #62350
Fix flaky crd e2e tests #62350
Conversation
tests passed, squashing |
e75e711
to
d642dcd
Compare
test/e2e/apimachinery/webhook.go
Outdated
@@ -1150,24 +1150,15 @@ func registerValidatingWebhookForCRD(f *framework.Framework, context *certContex | |||
Operations: []v1beta1.OperationType{v1beta1.Create}, | |||
Rule: v1beta1.Rule{ | |||
APIGroups: []string{"apiextensions.k8s.io"}, | |||
APIVersions: []string{"*"}, |
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.
why this change?
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 changed this line because the "/crd" endpoint in the webhook image expects version apiextensions.k8s.io/v1beta1. I wanted to make sure that the test wouldn't cause flaky behavior when we add v1 crd and add tests which create v1 crd objects
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.
wouldn't we want to be sure we updated this test and image as part of that?
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.
Okay I'll change this back but add a TODO about what to change to add support for v1
2fc89a0
to
9e8f27f
Compare
@liggitt Recommitting with an added a comment to warn people not to use the label |
e4e834a
to
e59cacd
Compare
e59cacd
to
7fee22b
Compare
cc @cheftako |
/lgtm |
@jennybuckley This pr also need to cherry-pick to 1.10 and 1.9. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hzxuzhonghu, jennybuckley, liggitt 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 |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
@hzxuzhonghu |
Yes, that's true. |
…#61609-#62350-upstream-release-1.9 Automatic merge from submit-queue. Automated cherry pick of #61609: Cleanup CRD/CR confusion in webhook e2e tests #62350: Fix flaky crd e2e tests Cherry pick of #61609 #62350 on release-1.9. #61609: Cleanup CRD/CR confusion in webhook e2e tests #62350: Fix flaky crd e2e tests
Fixes #62345
/sig api-machinery
/kind flake
/priority failing-test
From the issue:
This PR changes the test webhook image to support handling a new "/crd" path which would accept and deny crd creations based on their labels, only denying if if the object has the label
"webhook-e2e-test":"webhook-disallow"
, and updates the "AdmissionWebhook Should be able to deny custom resource creation" test to use that label.Release note: