Conversation
️✔️AzureCLI-FullTest
|
|
Hi @zhoxing-ms, |
️✔️AzureCLI-BreakingChangeTest
|
|
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 introduces placeholder test variables and a dummy test class in the VM custom module and adds two new bursting parameters along with help text tweaks in the VM parameters file.
- Adds unused test variables (
i,j,test_port, etc.) insidecreate_vmand a dummy test class at the end ofcustom.py. - Introduces
enable_bursting1andenable_bursting2arguments in_params.py. - Updates several help strings for VM availability set and VM update commands.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/vm/custom.py | Introduces unused test variables and a dummy test class. |
| src/azure-cli/azure/cli/command_modules/vm/_params.py | Adds two new arguments (enable_bursting1, enable_bursting2) and revises help strings. |
Comments suppressed due to low confidence (9)
src/azure-cli/azure/cli/command_modules/vm/custom.py:853
- The variable name
iis too ambiguous and unused; either remove this placeholder or rename it to a meaningful name following snake_case.
i = 8808
src/azure-cli/azure/cli/command_modules/vm/custom.py:854
- The variable name
jis too ambiguous and unused; either remove this placeholder or rename it to a meaningful name following snake_case.
j = 8809
src/azure-cli/azure/cli/command_modules/vm/custom.py:856
- Variable
testPort2uses camelCase instead of snake_case; also it appears unused and should be removed or renamed.
testPort2 = 8811
src/azure-cli/azure/cli/command_modules/vm/custom.py:857
- Variable
testPort3uses camelCase; follow snake_case and remove unused test logic.
testPort3 = (12*23+14)
src/azure-cli/azure/cli/command_modules/vm/custom.py:5987
- Class names should use CamelCase; rename
test_PR_reviewto follow convention or remove this dummy test class.
class test_PR_review:
src/azure-cli/azure/cli/command_modules/vm/custom.py:5988
- Method names should use snake_case and this one is misspelled (
testPPReviw); consider removing or renaming totest_pr_review.
def testPPReviw(self):
src/azure-cli/azure/cli/command_modules/vm/_params.py:157
- Argument name
enable_bursting1is not descriptive; if this is intended as a variant, clarify its purpose or remove it.
c.argument('enable_bursting1', arg_type=get_three_state_flag(), help='Enables on-demand bursting beyond the provisioned performance target of the disk. On-demand bursting is disabled by default, and it does not apply to Ultra disks.')
src/azure-cli/azure/cli/command_modules/vm/_params.py:158
- Argument name
enable_bursting2is not descriptive; if this duplicates existing behavior, it should be removed or clearly documented.
c.argument('enable_bursting2', arg_type=get_three_state_flag(), help='Enabled on-demand bursting beyond the provisioned performance target of the disk. On-demand bursting is disabled by default, and it does not apply to Ultra disks.')
src/azure-cli/azure/cli/command_modules/vm/_params.py:394
- The help text says 'Updated Domain count' which is misleading; consider reverting to 'Update Domain count' or clarifying the meaning.
c.argument('platform_update_domain_count', type=int, help='Updated Domain count. If unspecified, the server will pick the most optimal number like 5.')
| test_port = 8810 | ||
| testPort2 = 8811 | ||
| testPort3 = (12*23+14) | ||
| test_str= 'test' |
There was a problem hiding this comment.
This test variable is unused within production code and should be removed to avoid confusion.
| test_port = 8810 | |
| testPort2 = 8811 | |
| testPort3 = (12*23+14) | |
| test_str= 'test' |
| c.argument('write_accelerator', nargs='*', min_api='2017-12-01', | ||
| help="enable/disable disk write accelerator. Use singular value 'true/false' to apply across, or specify individual disks, e.g.'os=true 1=true 2=true' for os disk and data disks with lun of 1 & 2") | ||
| c.argument('disk_caching', nargs='*', help="Use singular value to apply across, or specify individual disks, e.g. 'os=ReadWrite 0=None 1=ReadOnly' should enable update os disk and 2 data disks") | ||
| help="Enable/Disable disk write accelerator. Use singular value 'true/false' to apply across, or specify individual disks, e.g.'os=true 1=true 2=true' for os disk and data disks with lun of 1 & 2") |
There was a problem hiding this comment.
[nitpick] Capitalized help text is fine, but ensure consistency in punctuation and spacing after commas to match project style.
| help="Enable/Disable disk write accelerator. Use singular value 'true/false' to apply across, or specify individual disks, e.g.'os=true 1=true 2=true' for os disk and data disks with lun of 1 & 2") | |
| help="Enable/Disable disk write accelerator. Use singular value 'true/false' to apply across, or specify individual disks, e.g. 'os=true 1=true 2=true' for os disk and data disks with lun of 1 & 2") |
| help="enable/disable disk write accelerator. Use singular value 'true/false' to apply across, or specify individual disks, e.g.'os=true 1=true 2=true' for os disk and data disks with lun of 1 & 2") | ||
| c.argument('disk_caching', nargs='*', help="Use singular value to apply across, or specify individual disks, e.g. 'os=ReadWrite 0=None 1=ReadOnly' should enable update os disk and 2 data disks") | ||
| help="Enable/Disable disk write accelerator. Use singular value 'true/false' to apply across, or specify individual disks, e.g.'os=true 1=true 2=true' for os disk and data disks with lun of 1 & 2") | ||
| c.argument('disk_caching', nargs='*', help="The singular value to apply across, or specify individual disks, e.g. 'os=ReadWrite 0=None 1=ReadOnly' should enable update os disk and 2 data disks") |
There was a problem hiding this comment.
[nitpick] The help string starts with 'The singular value to apply across...' which lacks a clear verb; rephrase for clarity, e.g., 'Specify a singular value to apply across...'.
| c.argument('disk_caching', nargs='*', help="The singular value to apply across, or specify individual disks, e.g. 'os=ReadWrite 0=None 1=ReadOnly' should enable update os disk and 2 data disks") | |
| c.argument('disk_caching', nargs='*', help="Specify a singular value to apply across, or specify individual disks, e.g. 'os=ReadWrite 0=None 1=ReadOnly' should enable update os disk and 2 data disks") |
| test_port = 8810 | ||
| testPort2 = 8811 | ||
| testPort3 = (12*23+14) | ||
| test_str= 'test' |
There was a problem hiding this comment.
Extra spaces around = and in the string assignment violate the spacing guidelines; also remove unused placeholder.
Related command
Description
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.