-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 flake TestMachineSetReconciler test #11728
Conversation
Thank you very much! /test pull-cluster-api-e2e-main /lgtm |
LGTM label has been added. Git tree hash: 12148c02e167f2d321cd30f2c47add5142542900
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
Triggered the wrong test /test pull-cluster-api-test-main |
@sbueringer For my better understanding, May I know how using scheme explicitly avoids test flake? |
My understanding from the error in https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/kubernetes-sigs_cluster-api/11718/pull-cluster-api-test-main/1881643904957157376 is the following The fake client is writing to a map in the scheme here:
At the same time a predicate from a CAPI controller is reading the scheme here:
By not using the same scheme in both cases they don't read/write the same map in the same scheme anymore (if scheme is not set the fake client uses some global default scheme) |
Got the point, Thanks for the explanation. |
What this PR does / why we need it:
Fixes flake TestMachineSetReconciler_syncReplicas_WithErrors test by explicitly use scheme in flake client.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #11722
/area testing