-
Notifications
You must be signed in to change notification settings - Fork 30
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
AzureStackHCIVirtualMachine Deletion Bug fix, tests, mocks and fixes for issues including linting, codeql, tsa, etc #250
AzureStackHCIVirtualMachine Deletion Bug fix, tests, mocks and fixes for issues including linting, codeql, tsa, etc #250
Conversation
This is great, but, can we break this into 2 pr's?
If we need to cherry pick the fix for this PR, it would be very challenging with all the test fraweowkr stuff. |
Hi @pradipd . The changes made are kind of reliant on each other(other than things like kustomization, crds, tsa, etc). Do you think once the changes in this PR are approved, can we raise a PR to the release branch with the changes that are actually needed for the fix(just the azurestackhcimachine controller changes). |
just a few small comments |
AzureStackHCIVirtualMachine Deletion Bug fix, tests, mocks and fixes for issues including linting, codeql, tsa, etc
The initial goal of the PR was to fix an issue in the reconcile deletion loop for azurestackhcivirtualmachine(
controllers/azurestackhcimachine_controller.go
). The deletion of azurestackhcivirtualmachine was being handled in a bit wrong way where the deltion of this VM was assumed as a synchronous operation which is not true. This is because, when we issue a delete to a custom resource, it has to go through the logic in the reconciliation loop for this specific resource and post that the resource is deleted. This PR updates the implementation by doing the following:Along, with fixing this bug, this PR does the following:
reconcileVirtualMachineDelete
) by using a mock client generated using mockgen for controller-runtime's client.patchesStrategicMerge
).kustomize edit fix
was recursively run against thekustomization.yaml
files.v1alpha3
andv1alpha4
from the controller-gen calls and updates these CRDs.