-
Notifications
You must be signed in to change notification settings - Fork 111
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 Azure machine deletion if resource group is gone #566
Fix Azure machine deletion if resource group is gone #566
Conversation
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
cc: @AxiomSamarth |
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.
Thanks for this fix @dkistner .
/lgtm
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.
Can you add an unit test about it to make sure that we don't regress it in the future?
gardener/machine-controller-manager-provider-azure#6 (currently private)
Hmm. We don't have much unit tests yet for the Azure driver (primarily for the data disks feature) and implementing this would mean to mock a lot of Azure api calls. Don't get me wrong I wanted to have that tests, but I guess it would make more sense (from an effort point of view) to do it in the out-of-tree, where we anyways then need to increase the test coverage. |
I would second this. With the OOT @AxiomSamarth is already building a framework for mocking and writing tests for azure MCM OOT provider. Should be easier to get it done there. |
Can we merge this change for now? @ialidzhikov |
Sure, please go on. It was just a remark from outside that we miss unit tests for such small things ;). |
Currently, the core MCM logic has a good framework for unit tests and we submit PRs with tests only. However, with drivers, we haven't invested here as we are moving all this logic into OOT. |
Sure, thanks. I got it. /lgtm |
Partially the problem lies with client libraries and what they expose to make unit tests. On AWS you get an interface that you can mock, but for others (azure, openstack) you mostly get structs and functions exposed and that means that there is quite a bit of manual labor involved to have proper unit tests. Not saying we shouldn't do it though. |
What this PR does / why we need it:
Allow MCM to delete Azure machines even if the underlying resource groups are already deleted. E. g. user delete the resource group manually.
Which issue(s) this PR fixes:
Fixes #562
Special notes for your reviewer:
Release note:
/invite @kon-angelo @ialidzhikov