[AKS] Fix az aks nodepool upgrade --max-unavailable being silently ignored#33215
[AKS] Fix az aks nodepool upgrade --max-unavailable being silently ignored#33215Jenniferyingni wants to merge 1 commit intoAzure:devfrom
Conversation
…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>
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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>
|
There was a problem hiding this comment.
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_unavailableintoinstance.upgrade_settings.max_unavailableduring nodepool upgrade.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if max_unavailable: | ||
| instance.upgrade_settings.max_unavailable = max_unavailable |
There was a problem hiding this comment.
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.
az aks nodepool upgrade --max-unavailablebeing silently ignored--max-unavailableparameter was accepted and validated but never assigned to the agent pool'supgrade_settingsbefore the PUT requestinstance.upgrade_settings.max_unavailable = max_unavailableFixes #33195
Related command
Description
Testing Guide
Run
az aks nodepool upgrade --max-unavailable <value>and verify the value is appliedHistory Notes
This 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.