[AKS] az aks nodepool add/update/upgrade: Add --max-blocked-nodes to specify maximum number or percentage of extra nodes that are allowed to be blocked in the agent pool during an upgrade#8787
Conversation
❌Azure CLI Extensions Breaking Change Test
|
|
Hi @zjpjack-github, |
|
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
Adds support for a new --max-blocked-nodes parameter across az aks nodepool add/update/upgrade commands, including validation, decorator, CLI handling, tests, and documentation.
- Introduce
max_blocked_nodesargument to command signatures and help - Implement
validate_max_blocked_nodesand wire it into parameter loading - Extend decorator and custom logic to read and apply the new setting
- Update tests to cover validator and integration scenarios
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/aks-preview/azext_aks_preview/tests/latest/test_validators.py | Add TestMaxBlockedNodes and new namespace for validator tests |
| src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py | Add integration tests for --max-blocked-nodes on add/update |
| src/aks-preview/azext_aks_preview/custom.py | Accept max_blocked_nodes in add/update/upgrade and update error messages |
| src/aks-preview/azext_aks_preview/agentpool_decorator.py | Read/apply max_blocked_nodes in decorator during create/update |
| src/aks-preview/azext_aks_preview/_validators.py | Implement validate_max_blocked_nodes |
| src/aks-preview/azext_aks_preview/_params.py | Register max_blocked_nodes argument with its validator |
| src/aks-preview/azext_aks_preview/_help.py | Document --max-blocked-nodes in CLI help |
Comments suppressed due to low confidence (1)
src/aks-preview/azext_aks_preview/custom.py:1397
- The error message is missing a slash before
--max-blocked-nodes. It should read...max-unavailable/--max-blocked-nodes using.
"update max-surge/drain-timeout/node-soak-duration/undrainable-node-behavior/max-unavailable-max-blocked-nodes using "
src/aks-preview/azext_aks_preview/tests/latest/test_validators.py
Outdated
Show resolved
Hide resolved
src/aks-preview/azext_aks_preview/tests/latest/test_validators.py
Outdated
Show resolved
Hide resolved
src/aks-preview/azext_aks_preview/tests/latest/test_validators.py
Outdated
Show resolved
Hide resolved
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py
Outdated
Show resolved
Hide resolved
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py
Outdated
Show resolved
Hide resolved
FumingZhang
left a comment
There was a problem hiding this comment.
Queued live test to validate the change.
- test_aks_nodepool_max_blocked_nodes
|
Please fix failed CI checks |
|
Applied fix for failed test cases in PR #8798 |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Requeued live test in staging env |
Failed with the following error
|
|
Please fix failed CI checks |
|
please resolve merge conflict on HISTORY.rst |
failed with error
Also there's new merge conflict |
|
Please resolve these conflicts |
32d16aa
|
[Release] Update index.json for extension [ aks-preview-18.0.0b9 ] : https://dev.azure.com/msazure/One/_build/results?buildId=126192197&view=results |
Related command
az aks nodepool add/update/upgrade --max-blocked-nodes
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)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.jsonautomatically.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.