[Compute] az vmss create: Add new parameter --enable-automatic-repairs to support setting automatic repairs policy#31722
Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| vmss create | cmd vmss create added parameter enable_automatic_repairs |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new parameter --enable-automatic-repairs to the vmss create command so that users can configure the automatic repairs policy and improves related validations and template generation. Key changes include new test cases for the parameter, updates to function signatures and error validations, and modifications to template building logic to support the repairs policy.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/latest/test_vm_commands.py | Added new test case for vmss with automatic repairs and zone balancing |
| custom.py | Updated create_vmss function signature to include enable_automatic_repairs |
| _validators.py | Added validation logic to raise an error for incompatible repairs settings |
| _template_builder.py | Updated build_vmss_resource signature and logic to support enable_automatic_repairs |
| _params.py | Introduced a new command argument for enable_automatic_repairs |
| _utils.py | Improved HTTP response error handling with additional exception support |
Comments suppressed due to low confidence (2)
src/azure-cli/azure/cli/command_modules/vm/_template_builder.py:1047
- [nitpick] Consider updating the function docstring for build_vmss_resource to document the new parameter 'enable_automatic_repairs'.
automatic_zone_balancing_strategy=None, automatic_zone_balancing_behavior=None,
| from azure.core.exceptions import StreamClosedError, StreamConsumedError | ||
| try: | ||
| error_txt = http_error.response.internal_response.text | ||
| error_info = json.loads(error_txt)['error'] | ||
| except (StreamClosedError, StreamConsumedError): | ||
| error_info = http_error.response.json()['error'] |
There was a problem hiding this comment.
Could you recording some az deployment related tests to check the fix effect of ARM deployment
az vmss create Add new parameter --enable-automatic-repairs to support setting automatic repairs policyaz vmss create: Add new parameter --enable-automatic-repairs to support setting automatic repairs policy
Related command
Description
close #31585
Fix #31709 #31581
Testing Guide
History Notes
[Compute]
az vmss create: Add new parameter--enable-automatic-repairsto support setting automatic repairs policy[ARM] Fix #31709:
az deployment: Fixthe content for this response was already consumedwhen create resourceThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.