-
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
🐛 Wait for MachinePools to be deleted before deleting KCP Machines #4646
🐛 Wait for MachinePools to be deleted before deleting KCP Machines #4646
Conversation
MHC flake /retest |
}, | ||
} | ||
|
||
initObjs := []client.Object{cluster.DeepCopy(), kcp.DeepCopy(), workerMachinePool.DeepCopy()} |
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.
nit: This deepCopy is fine though is a bit redundant. I see this is calling newFakeClient
which calls NewFakeClientWithScheme
which already deepCopy the objects
cluster-api/test/helpers/client.go
Line 38 in 5858391
objsWithResourceVersion := initObjs[i].DeepCopyObject().(client.Object) |
Also the fakeClient tracker itself deepCopy as well.
https://github.com/kubernetes/client-go/blob/master/testing/fixture.go#L373-L376
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
// Verify that only control plane machines remain | ||
if len(allMachines) != len(ownedMachines) { | ||
if len(allMachines) != len(ownedMachines) || len(allMachinePools.Items) != 0 { |
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.
Should we sum all the dependents in a single integer? If later on we add more classes it might be easier to reason about
What this PR does / why we need it: As per #3863 (comment) when doing when "Waiting for worker nodes to be deleted first" inside reconcileDelete, KCP should wait for MachinePools to be deleted as well.
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 #3880