-
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
🌱 Improve TestReconcileMachinePoolMachines unit test #11124
🌱 Improve TestReconcileMachinePoolMachines unit test #11124
Conversation
Skipping CI for Draft Pull Request. |
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.
/lgtm
LGTM label has been added. Git tree hash: 552ec153c4b4c9a253cf1760032ec62f9cc54b74
|
I don't really get the change from APIReader to Client. APIReader directly accesses the apiserver, Client uses a cache. So I don't see how switching to Client makes the tests more stable (probably it will make it more flaky) |
I think you’re right, will revert this change |
762a825
to
35cf278
Compare
Thank you! /lgtm |
LGTM label has been added. Git tree hash: 0294a7af8986abdbfef884214036112bd5577758
|
[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 |
What this PR does / why we need it:
we can see in the failing test results (i.e. https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/periodic-cluster-api-test-mink8s-main/1830171842158006272) that this line
cluster-api/exp/internal/controllers/machinepool_controller_phases.go
Line 437 in 703cc70
infraMachine
s are recognized and the 2 machinepool machines are created accordinglymy theory is that a cache sync delay is causing this flake as only 1 of the expected
infraMachine
s is found in the cache whenreconcileMachines
gets calledthis pr updates the method called to Create objects in this set of unit test to the "preferred" method:
instead of
Create()
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 #11070
(hopefully)
/area machinepool