[AKS] az aks create/update: Fix handling for --container-storage-version parameter#32015
[AKS] az aks create/update: Fix handling for --container-storage-version parameter#32015
az aks create/update: Fix handling for --container-storage-version parameter#32015Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks create | cmd aks create update parameter container_storage_version: added property choices=['1', '2'] |
||
| aks update | cmd aks update update parameter container_storage_version: added property choices=['1', '2'] |
|
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>
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the Azure Container Storage version handling in AKS commands by adding support for version '2' and improving validation logic. The changes ensure users can specify version '2' (which follows the same behavior as the latest version) and prevent invalid parameter combinations.
- Added validation to reject unsupported Azure Container Storage versions
- Added validation to prevent using
--container-storage-versionwith--disable-azure-container-storage - Extended supported versions to include both '1' and '2'
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| managed_cluster_decorator.py | Added version validation logic and parameter conflict checks for Azure Container Storage configuration |
| _consts.py | Added constant for supported Azure Container Storage versions including '1' and '2' |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py
Show resolved
Hide resolved
FumingZhang
left a comment
There was a problem hiding this comment.
You could consider declaring the option in _params.py as shown below. This way, the CLI framework can help validate the value, which would save you some effort.
c.argument(
"container_storage_version",
arg_type=get_enum_type(CONST_SUPPORTED_ACSTOR_VERSIONS),
)
0053e92 to
aeba916
Compare
Fixed. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Please fix CI issues |
…r-storage-version parameter
aeba916 to
f472334
Compare
|
Queued live test (re-queued for temp failures) to validate the change, test passed!
|
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az aks create
az aks update
Description
Testing Guide
az aks update -g test-rg -n test-cluster --enable-azure-container-storage --container-storage-version 2
az aks create -g test-rg -n test-cluster --enable-azure-container-storage --container-storage-version 2
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.