-
Notifications
You must be signed in to change notification settings - Fork 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
[Compute] Fix #30009: az vm install-patches
: Fix errors due to typos in install_patches function
#30011
Conversation
Install_patches has paramerters with typos and throw the following error: Error given: kb_numbers_to_inclunde is not a known attribute of class <class 'azure.mgmt.compute.v2024_03_01.models._models_py3.WindowsParameters'> and will be ignored exclude_kbs_requirig_reboot is not a known attribute of class <class 'azure.mgmt.compute.v2024_03_01.models._models_py3.WindowsParameters'> and will be ignored Parameters should be kb_numbers_to_include and exclude_kbs_requiring_reboot respectively
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Compute |
az vm install-patches
fix errors due to typos in install_patches function
Updated title, team do we have any updates on this? |
Please fix CI issues |
Fixed |
az vm install-patches
fix errors due to typos in install_patches functionaz vm install-patches
: Fix errors due to typos in install_patches function
@Dxaz Could you please add some tests for these cases? |
Please note that Azure CLI will have a code freeze at 10/29/2024 10:00 UTC for the upcoming release. Please resolve the comments ASAP if you want to catch the release train, otherwise the PR has to be postponed to next sprint (11-19). |
Done.
I understand. |
@Dxaz Could you please resolve this CI issue? |
Theres a specific issue with python 3.9.20. Let me investigate further. |
unittest > case.py TestCase class has no assertNoLogs method in 3.9.20. So this testcase cannot be made for this scenario. Since the error in question for this PR is a log level warning thrown by azure.mgmt.compute._serialization. I cannot make an assertion for this scenario in python 3.9.20. Any thoughts @zhoxing-ms? |
# Test for WindowsParameters and check for serialization warning/errors | ||
with self.assertNoLogs(logger='azure.mgmt.compute._serialization', level='WARNING'): | ||
self.cmd('vm install-patches -g {rg} -n vm --maximum-duration PT4H --reboot-setting IfRequired --classifications-to-include-win Critical Security --exclude-kbs-requiring-reboot true --max-patch-publish-date 2024-11-01T02:36:43', checks=[ | ||
self.check('status', 'Succeeded') | ||
]) | ||
|
||
# Test for LinuxParameters and check for serialization warning/errors | ||
with self.assertNoLogs(logger='azure.mgmt.compute._serialization', level='WARNING'): | ||
self.cmd('vm install-patches -g {rg} -n vm2 --maximum-duration PT4H --reboot-setting Never --classifications-to-include-linux Other', checks=[ | ||
self.check('status', 'Succeeded') | ||
]) |
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.
@Dxaz I suggest that we should verify that the relevant features can work properly after correcting these parameters, rather than verifying that there are no warning logs
Hello - We're keen to see this issue fixed. Since Azure Update Manager has been introduced we're using more of these CLI commands to manage patching operations. Our pipeline for Windows is on hold and using an older version is not a possibility as the typos have existed for too long. Will this be released in November by chance??? |
@Dxaz Could you please resolve these comments and CI issues? |
@pl-andykalman Sorry, due to the CI issues and comments of this PR not being resolved in a timely manner, it will not be able to catch up with the release in November. @Dxaz Please try to complete it before the release for December |
Hey Team, sorry for the delay, I will work on this asap |
@zhoxing-ms updated the tests, now I'm just waiting for CI to run and complete |
@zhoxing-ms when you have an opportunity may you approve the changes, please? |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Fix #30009
Related command
az vm install-patches
Description
Install_patches has paramerters with typos and throw the following error: Error given: kb_numbers_to_inclunde is not a known attribute of class <class 'azure.mgmt.compute.v2024_03_01.models._models_py3.WindowsParameters'> and will be ignored
exclude_kbs_requirig_reboot is not a known attribute of class <class 'azure.mgmt.compute.v2024_03_01.models._models_py3.WindowsParameters'> and will be ignored
Parameters should be kb_numbers_to_include and exclude_kbs_requiring_reboot respectively
Original pull request containing typos:
3a5091e
Testing Guide
az vm install-patches --resource-group myResourceGroup --name myVM --maximum-duration PT4H --reboot-setting IfRequired
gives error:
kb_numbers_to_inclunde is not a known attribute of class <class 'azure.mgmt.compute.v2024_07_01.models._models_py3.WindowsParameters'> and will be ignored
exclude_kbs_requirig_reboot is not a known attribute of class <class 'azure.mgmt.compute.v2024_07_01.models._models_py3.WindowsParameters'> and will be ignored
History Notes
[Compute] Fix issue #30009 : az vm install-patches: fix errors