Skip to content

[AKS] Fix az aks nodepool upgrade --max-unavailable being silently ignored#33215

Open
Jenniferyingni wants to merge 1 commit intoAzure:devfrom
Jenniferyingni:fix/nodepool-upgrade-max-unavailable
Open

[AKS] Fix az aks nodepool upgrade --max-unavailable being silently ignored#33215
Jenniferyingni wants to merge 1 commit intoAzure:devfrom
Jenniferyingni:fix/nodepool-upgrade-max-unavailable

Conversation

@Jenniferyingni
Copy link
Copy Markdown
Member

@Jenniferyingni Jenniferyingni commented Apr 17, 2026

  • Fix az aks nodepool upgrade --max-unavailable being silently ignored
  • The --max-unavailable parameter was accepted and validated but never assigned to the agent pool's upgrade_settings before the PUT request
  • Added the missing assignment: instance.upgrade_settings.max_unavailable = max_unavailable

Fixes #33195

Related command

Description

Testing Guide
Run az aks nodepool upgrade --max-unavailable <value> and verify the value is applied

History Notes


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

…ignored

The `--max-unavailable` flag was accepted but never applied to the agent
pool upgrade settings before the PUT request, causing it to be silently
dropped. Add the missing assignment.

Fixes Azure#33195

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 17, 2026 15:00
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

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

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 17, 2026

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

@github-actions
Copy link
Copy Markdown

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>

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

Fixes az aks nodepool upgrade --max-unavailable being accepted/validated but not applied to the AgentPool PUT payload, so the setting was silently dropped.

Changes:

  • Assign max_unavailable into instance.upgrade_settings.max_unavailable during nodepool upgrade.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3170 to +3171
if max_unavailable:
instance.upgrade_settings.max_unavailable = max_unavailable
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

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

Consider adding a unit test that exercises aks_agentpool_upgrade(..., max_unavailable=...) and asserts the object passed to client.begin_create_or_update has upgrade_settings.max_unavailable set. The existing scenario tests explicitly skip running nodepool upgrades, so without a unit test this regression could reappear unnoticed.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad AKS az aks/acs/openshift Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az aks nodepool upgrade silently drops --max-unavailable flag

5 participants