Skip to content

Conversation

@kwiesmueller
Copy link
Member

What type of PR is this?

/kind bug
/kind flake

What this PR does / why we need it:

This should fix the flakiness of the TestMutatingWebhookResetsInvalidManagedFields test.

Which issue(s) this PR fixes:

Fixes #100556

Special notes for your reviewer:

I'm not entirely sure yet why the flakes happen. The change right now moves the test closer to what has been done in duplicate_owner_ref_test.go which might do the trick.
I'd like to avoid increasing the timeout as there should be no reason to and the 30s right now are really long already.

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/flake Categorizes issue or PR as related to a flaky test. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 22, 2021
@k8s-ci-robot
Copy link
Contributor

@kwiesmueller: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 22, 2021
@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 22, 2021
@kwiesmueller
Copy link
Member Author

/wg api-expression
/cc @liggitt
I'll let this run a few times to see if I can get a flake. Still couldn't manager to break it locally, but the change should improve it.
When breaking the code it tests locally, the test failed way to quickly which I think is because the warning conditions were outside the polling loop.

@k8s-ci-robot k8s-ci-robot requested a review from liggitt April 22, 2021 20:08
@k8s-ci-robot k8s-ci-robot added the wg/api-expression Categorizes an issue or PR as relevant to WG API Expression. label Apr 22, 2021
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this move inside the loop as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it has to, but it could yes.
Let me try and meanwhile I'll trigger the tests again.

Copy link
Member

@liggitt liggitt Apr 22, 2021

Choose a reason for hiding this comment

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

yeah, as written previously, the loop didn't actually ensure the webhook was called... if the webhook wasn't observed by the admission webhook informer yet, the patch call would succeed with no warnings and fail the test

move the reset to the top of the loop with a defer, then lgtm

Copy link
Member Author

Choose a reason for hiding this comment

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

just did that, wanted to wait for the result before I push but here it comes.

@kwiesmueller
Copy link
Member Author

/test all

@kwiesmueller kwiesmueller force-pushed the flake-apply-mutating-webhook branch from 390eb27 to 96a8df4 Compare April 22, 2021 22:09
@liggitt
Copy link
Member

liggitt commented Apr 22, 2021

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 22, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kwiesmueller, liggitt

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 Apr 22, 2021
@liggitt
Copy link
Member

liggitt commented Apr 22, 2021

once merged, please also pick to release-1.21 to clean up CI there

k8s-ci-robot added a commit that referenced this pull request Apr 29, 2021
…-#101380-upstream-release-1.21

Automated cherry pick of #101380: fix TestMutatingWebhookResetsInvalidManagedFields flakes
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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. wg/api-expression Categorizes an issue or PR as relevant to WG API Expression.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flake] k8s.io/kubernetes/test/integration/apiserver/admissionwebhook: TestMutatingWebhookResetsInvalidManagedFields

3 participants