Skip to content

[AKS] aks-preview: Add --zones to nodepool update - #10248

Open
Alex Huang (wenhug) wants to merge 2 commits into
Azure:mainfrom
wenhug:wenhug/aks-nodepool-update-zones
Open

[AKS] aks-preview: Add --zones to nodepool update#10248
Alex Huang (wenhug) wants to merge 2 commits into
Azure:mainfrom
wenhug:wenhug/aks-nodepool-update-zones

Conversation

@wenhug

@wenhug Alex Huang (wenhug) commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️aks-preview
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd aks nodepool update cmd aks nodepool update added parameter zones

Related command

az aks nodepool update --zones auto

Description

Adds preview --zones/-z support to aks-preview node pool update and bumps the extension to 22.0.0b4. A regional VMSS node pool can migrate to automatic zone placement with --zones auto; omitting the option preserves the current setting. The option composes with the existing --node-vm-size resize flow.

The implementation remains compatible with both current CLI core and a future core that handles zones in its default decorator flow, without applying the update twice. Other availability-zone changes remain subject to service restrictions.

Companion official CLI PR: Azure/azure-cli#33976

Validation

  • Related extension tests: 146 passed, 2 skipped, 6 subtests passed.
  • Core-compatibility tests: 21 passed, 2 skipped, 6 subtests passed.
  • Index tests: 9 passed, 2 skipped.
  • Refreshed two pre-existing cassette API-version drifts (Key Vault and Compute); targeted replay: 2 passed. The same failures reproduced on unrelated PR {AKS} az aks alert-config: Add commands to manage alert configurations #10155 / ADO build 341562.
  • azdev linter aks-preview and git diff --check passed.
  • azdev style aks-preview was run; the repository-wide command exits on existing missing optional dependencies and vendored SDK/build-tree lint findings unrelated to this diff.
  • Isolated wheel smoke verified only local aks-preview 22.0.0b4 was loaded and help exposes --zones -z [Preview].
  • East US 2 live tests:
    • extpool: availabilityZones: null to ["auto"], final state Succeeded.
    • combopool: --zones auto --node-vm-size Standard_D4s_v3, final state Succeeded; the profile reported ["auto"] and Standard_D4s_v3, and the replacement VMSS instance was placed in zone 1.

General Guidelines

  • Ran azdev style aks-preview locally (baseline issues noted above).
  • Ran python scripts/ci/test_index.py -q locally.
  • Extension version conforms to the extension version schema.

Copilot AI lite review requested due to automatic review settings August 25, 2026 01:32
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Alex Huang (@wenhug),
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 pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

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

Adds preview --zones/-z support to az aks nodepool update, including automatic zone placement and compatibility with VM-size updates.

Changes:

  • Adds zone parameters, help text, and release metadata.
  • Applies zone updates while preserving omitted values.
  • Adds compatibility and unit test coverage; bumps version to 22.0.0b4.

Reviewed changes

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

Show a summary per file
File Summary
src/aks-preview/setup.py Bumps extension version.
src/aks-preview/HISTORY.rst Documents the new option.
src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py Tests update-flow compatibility.
src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py Tests zone mutation and serialization.
src/aks-preview/azext_aks_preview/custom.py Adds zones to the update command.
src/aks-preview/azext_aks_preview/agentpool_decorator.py Applies zone updates with core compatibility handling.
src/aks-preview/azext_aks_preview/_params.py Registers --zones and -z.
src/aks-preview/azext_aks_preview/_help.py Adds help documentation and an example.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@wenhug

Copy link
Copy Markdown
Contributor Author

CI follow-up: build 341763 exposed two repository-baseline cassette API-version drifts unrelated to --zones (Key Vault 2025-05-01 → 2026-02-01 and Compute VMSS 2025-04-01 → 2026-04-01). The same two failures occur across Python 3.10–3.14 on unrelated PR #10155 / ADO build 341562. Commit 81d12c0 refreshes only those request URIs; targeted replay now passes (2 passed).

@yonzhan

Copy link
Copy Markdown
Collaborator

AKS

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants