Skip to content

{aks-preview} Migrate commands calling Compute module to aaz-based implementation - #9793

Merged
Julie Zhu (yanzhudd) merged 13 commits into
Azure:mainfrom
william051200:aks-preview-migration
Jun 1, 2026
Merged

{aks-preview} Migrate commands calling Compute module to aaz-based implementation#9793
Julie Zhu (yanzhudd) merged 13 commits into
Azure:mainfrom
william051200:aks-preview-migration

Conversation

@william051200

@william051200 William (william051200) commented Apr 17, 2026

Copy link
Copy Markdown
Member

Migration from mgmt.compute to aaz-based


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings April 17, 2026 08:46
@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Apr 17, 2026

Copy link
Copy Markdown
️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions

Copy link
Copy Markdown
Contributor

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions

Copy link
Copy Markdown
Contributor

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions

github-actions Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Hi William (@william051200)

Release Suggestions

Module: aks-preview

  • Update VERSION to 21.0.0b2 in src/aks-preview/setup.py

Notes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates aks-preview extension code paths that previously depended on azure.mgmt.compute to instead call compute operations via Azure CLI’s AAZ/operations implementations, and bumps the extension version accordingly.

Changes:

  • Replace compute runCommand, VMSS/VM list/show, and SKU listing calls with AAZ/CLI operation implementations.
  • Remove the now-unused get_compute_client factory.
  • Bump extension version to 20.0.0b3 and add release notes entry.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/aks-preview/setup.py Bumps extension version to 20.0.0b3.
src/aks-preview/azext_aks_preview/custom.py Migrates VM/VMSS-related operations (run-command, list/show) to AAZ/CLI ops and adjusts result parsing.
src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py Switches VM SKU enumeration to AAZ-based SKU listing and adapts to dict-shaped results.
src/aks-preview/azext_aks_preview/_completers.py Switches VM size completion data source to CLI operations and adapts to dict-shaped results.
src/aks-preview/azext_aks_preview/_client_factory.py Removes get_compute_client factory after migration away from mgmt.compute.
src/aks-preview/HISTORY.rst Adds 20.0.0b3 release notes entry.

Comment thread src/aks-preview/HISTORY.rst Outdated
+++++++

20.0.0b3
+++++++

Copilot AI Apr 17, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reStructuredText section underline for 20.0.0b3 is shorter than the heading text, which can break RST parsing/rendering. Update the underline length (or style) so it is at least as long as the version string, consistent with the other headings.

Suggested change
+++++++
++++++++

Copilot uses AI. Check for mistakes.
cf_agent_pools,
get_compute_client,
)
cf_agent_pools)

Copilot AI Apr 17, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multi-line import from _client_factory is now formatted with the closing parenthesis on the same line as the last imported name and without a trailing comma. This deviates from the surrounding import style in this file and makes future diffs noisier; please format it consistently with the other parenthesized imports.

Suggested change
cf_agent_pools)
cf_agent_pools,
)

Copilot uses AI. Check for mistakes.

@FumingZhang FumingZhang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queued live test to validate the change.

  • test_aks_check_network
  • test_aks_kollect
  • test_aks_kollect_with_managed_aad
  • test_aks_create_with_azurecontainerstorage_v1
  • test_aks_create_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters
  • test_aks_create_with_azurecontainerstorage_v1_with_nodepool_name
  • test_aks_create_with_azurecontainerstorage
  • test_aks_create_with_azurecontainerstorage_with_ephemeral_disk_parameters
  • test_aks_create_with_azurecontainerstorage_with_elastic_san_parameters
  • test_aks_create_with_azurecontainerstorage_with_multiple_parameters
  • test_aks_update_with_azurecontainerstorage
  • test_aks_update_with_azurecontainerstorage_with_ephemeral_disk
  • test_aks_update_with_azurecontainerstorage_with_elastic_san
  • test_aks_update_with_azurecontainerstorage_with_multiple_parameters
  • test_aks_update_with_azurecontainerstorage_v1
  • test_aks_update_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters

@FumingZhang

Copy link
Copy Markdown
Member

Queued live test to validate the change.

  • test_aks_check_network
  • test_aks_kollect
  • test_aks_kollect_with_managed_aad
  • test_aks_create_with_azurecontainerstorage_v1
  • test_aks_create_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters
  • test_aks_create_with_azurecontainerstorage_v1_with_nodepool_name
  • test_aks_create_with_azurecontainerstorage
  • test_aks_create_with_azurecontainerstorage_with_ephemeral_disk_parameters
  • test_aks_create_with_azurecontainerstorage_with_elastic_san_parameters
  • test_aks_create_with_azurecontainerstorage_with_multiple_parameters
  • test_aks_update_with_azurecontainerstorage
  • test_aks_update_with_azurecontainerstorage_with_ephemeral_disk
  • test_aks_update_with_azurecontainerstorage_with_elastic_san
  • test_aks_update_with_azurecontainerstorage_with_multiple_parameters
  • test_aks_update_with_azurecontainerstorage_v1
  • test_aks_update_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters

Re-queued live test

@FumingZhang

Copy link
Copy Markdown
Member

William (@william051200), could you re-queue the live test to confirm that the change still passes all existing test cases?

@william051200

Copy link
Copy Markdown
Member Author

Hi FumingZhang , I tried opening the pipeline link but I don't have access to the internal msazure Azure DevOps project, so I can't re-queue the live test from my side. The branch is up to date with main and ready to run, could you re-queue it for me? Thanks for your help!


@AllowLargeResponse()
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Queued live test

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 cases failed in the live test, but none are related to the changes in this PR. All other cases have passed.

@FumingZhang FumingZhang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread src/aks-preview/HISTORY.rst Outdated
++++++
* Vendor new SDK and bump API version to 2026-02-02-preview.

20.0.0b3

@FumingZhang FumingZhang May 28, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since 20.0.0b3 has already been released, please select a new version number. William (@william051200)

@yanzhudd
Julie Zhu (yanzhudd) merged commit 68bc38a into Azure:main Jun 1, 2026
24 checks passed
@azclibot

Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ aks-preview-21.0.0b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=166225639&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants