Skip to content

[AKS] az aks nodepool add/update --enable-managed-gpu option #9704

Merged
yanzhudd merged 19 commits intoAzure:mainfrom
runzhen:managed-gpu
Mar 25, 2026
Merged

[AKS] az aks nodepool add/update --enable-managed-gpu option #9704
yanzhudd merged 19 commits intoAzure:mainfrom
runzhen:managed-gpu

Conversation

@runzhen
Copy link
Copy Markdown
Contributor

@runzhen runzhen commented Mar 19, 2026


Add managed GPU enablement option to node pool property in az aks nodepool add and az aks nodepool update

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

Related command

  • az aks nodepool add
  • az aks nodepool update

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)

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 March 19, 2026 17:43
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 19, 2026

❌Azure CLI Extensions Breaking Change Test
❌aks-preview
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate aks nodepool add cmd aks nodepool add update parameter spot_max_price: updated property default from nan to nan please change property default from nan to nan for parameter spot_max_price of cmd aks nodepool add
⚠️ 1006 - ParaAdd aks nodepool add cmd aks nodepool add added parameter enable_managed_gpu
⚠️ 1006 - ParaAdd aks nodepool update cmd aks nodepool update added parameter enable_managed_gpu

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @runzhen,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a preview --enable-managed-gpu flag to AKS nodepool add/update flows, wiring it through argument parsing, decorators, help text, and tests to set gpuProfile.nvidia.managementMode=Managed.

Changes:

  • Add --enable-managed-gpu to az aks nodepool add and az aks nodepool update argument sets and help.
  • Decorate AgentPool objects to set gpu_profile.nvidia.management_mode = "Managed" when enabled.
  • Add unit and live tests verifying the flag sets gpuProfile.nvidia.managementMode to Managed.

Reviewed changes

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

Show a summary per file
File Description
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py Adds live-only tests for nodepool add/update with --enable-managed-gpu.
src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py Adds unit tests for context getter + add/update decorator behaviors for managed GPU.
src/aks-preview/azext_aks_preview/custom.py Extends nodepool add/update custom function signatures with enable_managed_gpu.
src/aks-preview/azext_aks_preview/agentpool_decorator.py Implements get_enable_managed_gpu, plus add/update mutation for managed GPU on AgentPool.
src/aks-preview/azext_aks_preview/_params.py Registers enable_managed_gpu CLI argument for nodepool add/update.
src/aks-preview/azext_aks_preview/_help.py Documents --enable-managed-gpu in command help.
src/aks-preview/azext_aks_preview/_consts.py Adds constants for GPU management mode values.
src/aks-preview/HISTORY.rst Adds changelog entry for the new managed GPU option.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py Outdated
Comment thread src/aks-preview/azext_aks_preview/agentpool_decorator.py Outdated
Comment thread src/aks-preview/azext_aks_preview/agentpool_decorator.py
Comment thread src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Mar 19, 2026

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
Copy link
Copy Markdown
Contributor

Hi @runzhen

Release Suggestions

Module: aks-preview

  • Update VERSION to 19.0.0b28 in src/aks-preview/setup.py

Notes

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Hi @runzhen

Release Suggestions

Module: aks-preview

  • Update VERSION to 19.0.0b28 in src/aks-preview/setup.py

Notes

@runzhen runzhen changed the title add --enable-managed-gpu option az aks nodepool add/update --enable-managed-gpu option Mar 19, 2026
@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

Queued live test to validate the change.

Re-queued live test

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

There is a bug affecting the CI, and I have reported it as a GitHub issue (#9714). As a temporary solution, please rebase or merge from main to ensure the CI passes. @runzhen

@runzhen
Copy link
Copy Markdown
Contributor Author

runzhen commented Mar 24, 2026

@FumingZhang , can you run the pipeline again?

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Copy Markdown
Member

The CI failed because of bugs #9714 and #9716. Until the CLI team resolves the issue, the current workaround is to rebase or merge your branch with main. This ensures that no other changes from the main branch are mistakenly included in your PR, which could cause validation to fail. @runzhen

@runzhen runzhen changed the title az aks nodepool add/update --enable-managed-gpu option [AKS] az aks nodepool add/update --enable-managed-gpu option Mar 24, 2026
@runzhen
Copy link
Copy Markdown
Contributor Author

runzhen commented Mar 24, 2026

@FumingZhang can you run pipeline again ?

@FumingZhang
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@runzhen
Copy link
Copy Markdown
Contributor Author

runzhen commented Mar 25, 2026

Hi @yanzhudd @FumingZhang , anything else need I to do? can you merge this PR now?

@yanzhudd yanzhudd merged commit 3aa7aa4 into Azure:main Mar 25, 2026
24 checks passed
@runzhen runzhen deleted the managed-gpu branch March 25, 2026 05:17
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.

6 participants