[AKS] Add agentpool rollback functionality for AKS RP #9314
[AKS] Add agentpool rollback functionality for AKS RP #9314yanzhudd merged 5 commits intoAzure:mainfrom
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks nodepool get-rollback-versions | cmd aks nodepool get-rollback-versions added |
||
| aks nodepool rollback | cmd aks nodepool rollback added |
|
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
This PR adds agentpool rollback functionality for AKS (Azure Kubernetes Service), enabling users to rollback nodepools to previously used configurations.
- Adds two new commands:
get-rollback-versionsandrollbackfor AKS nodepools - Implements comprehensive test coverage for the new rollback functionality
- Increments the extension version from 18.0.0b44 to 18.0.0b45
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Version increment to 18.0.0b45 |
| test_aks_commands.py | Adds comprehensive test cases for get-rollback-versions and rollback commands |
| custom.py | Implements core rollback functionality with version validation |
| commands.py | Registers new commands with table formatting |
| _params.py | Defines command-line parameters for rollback operations |
| _help.py | Adds documentation and examples for new commands |
| _format.py | Implements table formatting for rollback versions display |
| HISTORY.rst | Documents the new features in version 18.0.0b45 |
Comments suppressed due to low confidence (8)
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py:1
- Trailing whitespace should be removed for consistency with code formatting standards.
# --------------------------------------------------------------------------------------------
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py:12616
- Trailing whitespace should be removed for consistency with code formatting standards.
).get_output_in_json()["id"]
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py:12616
- Trailing whitespace should be removed for consistency with code formatting standards.
).get_output_in_json()["id"]
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py:1
- Trailing whitespace should be removed for consistency with code formatting standards.
# --------------------------------------------------------------------------------------------
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py:12616
- Trailing whitespace should be removed for consistency with code formatting standards.
).get_output_in_json()["id"]
|
Hi @InduSridhar Release SuggestionsModule: aks-preview
Notes
|
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py
Outdated
Show resolved
Hide resolved
|
don't forget to resolve the merge conflict |
FumingZhang
left a comment
There was a problem hiding this comment.
please fix failed CI checks
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.
self = <azure.cli.core._profile.Profile object at 0x7f0ed2d18450>
subscription = Nonedef get_subscription(self, subscription=None): # take id or name subscriptions = self.load_cached_subscriptions() if not subscriptions:raise CLIError(_AZ_LOGIN_MESSAGE)E knack.util.CLIError: Please run 'az login' to setup account.
../azure-cli/src/azure-cli-core/azure/cli/core/_profile.py:558: CLIError
- generated xml file: /home/cloudtest/.azdev/env_config/mnt/vss/_work/1/s/env/test_results.xml -
=========================== short test summary info ============================
FAILED src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py::AzureKubernetesServiceScenarioTest::test_aks_nodepool_rollback
============ 1 failed, 837 passed, 78 skipped in 286.70s (0:04:46) =============
The newly added test case is failing because a corresponding recording file hasn't been included. As a result, CI attempts to run the test in live mode but encounters an az login error since the pipeline lacks the necessary credentials. To resolve this, please either commit the recording file or mark the test case with @live_only().
https://dev.azure.com/azclitools/public/public%20Team/_build/results?buildId=278230&view=logs&a…
|
please rebase from main to pick the fix in #9335 and then re-queue the live test. |
2a70a8c to
6de5650
Compare
CodeGen Tools Feedback CollectionThank 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 |
src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py
Outdated
Show resolved
Hide resolved
|
CI failed with following error
Please create new recording file or manually update the API versions in the existing one. |
|
Please fix CI issues |
|
now the CI failed with error
@wangzelin007 could you please help take a look? |
Fixed by #9412, please merge the latest code from the main into your branch. |
67fdc97 to
19a6f6d
Compare
FumingZhang
left a comment
There was a problem hiding this comment.
Queued live test to validate the change.
Case test_aks_nodepool_rollback failed with following error
if not upgrade_profile.recently_used_versions or len(upgrade_profile.recently_used_versions) == 0:raise CLIError("No rollback versions available. The nodepool must have been upgraded at least once " "to have rollback history available." )E knack.util.CLIError: No rollback versions available. The nodepool must have been upgraded at least once to have rollback history available.
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
ce84469 to
dbf7af8
Compare
dbf7af8 to
fedfa8f
Compare
e139ddb to
724453e
Compare
724453e to
00fa1c0
Compare



This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
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.