Skip to content

{AKS} az aks nodepool rollback: Show an accurate warning when only the node OS upgrade channel is enabled - #33854

Merged
Julie Zhu (yanzhudd) merged 2 commits into
Azure:devfrom
InduSridhar:indu/fix-rollback-nodeos-warning
Aug 6, 2026
Merged

{AKS} az aks nodepool rollback: Show an accurate warning when only the node OS upgrade channel is enabled#33854
Julie Zhu (yanzhudd) merged 2 commits into
Azure:devfrom
InduSridhar:indu/fix-rollback-nodeos-warning

Conversation

@InduSridhar

@InduSridhar InduSridhar commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command

az aks nodepool rollback

Description

When Kubernetes auto-upgrade is disabled but nodeOSUpgradeChannel is enabled, the core CLI currently warns that rollback will not succeed. This is misleading: the orchestrator version rollback proceeds; only the node image rollback is affected by the node OS upgrade channel.

This change ports the split warning behavior from Azure/azure-cli-extensions#9733 while retaining the enum .value normalization from #33748:

  • upgradeChannel enabled: retain the hard warning that rollback will not succeed until auto-upgrade is disabled.
  • only nodeOSUpgradeChannel enabled: state that orchestrator rollback proceeds but node image rollback will not succeed.
  • both disabled: emit no warning.

Validation

Live validation with Azure CLI 2.89.0 and no aks-preview extension:

  1. Created a disposable node pool at Kubernetes 1.34.8.
  2. Upgraded it to 1.34.9.
  3. Confirmed rollback history targeted 1.34.8.
  4. Ran az aks nodepool rollback with upgradeChannel=none and nodeOSUpgradeChannel=NodeImage.
  5. Verified the pool returned to Succeeded on Kubernetes 1.34.8.
  6. Deleted the disposable pool.

Targeted unit tests:

PYTHONPATH=src/azure-cli /opt/homebrew/Cellar/azure-cli/2.89.0/libexec/bin/python -m unittest azure.cli.command_modules.acs.tests.latest.test_custom.AksAgentpoolRollbackTest

Result: 4 tests passed.

git diff --check passed.

History Notes

[AKS] az aks nodepool rollback: Show an accurate warning when only the node OS upgrade channel is enabled

Copilot AI lite review requested due to automatic review settings August 5, 2026 23:18
@InduSridhar
InduSridhar requested a review from a team as a code owner August 5, 2026 23:18
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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

This PR refines az aks nodepool rollback warnings so they accurately reflect rollback behavior when upgradeChannel and/or nodeOSUpgradeChannel are enabled, and adds unit coverage for the node OS channel warning path.

Changes:

  • Split the rollback warning logic to distinguish upgradeChannel from nodeOSUpgradeChannel.
  • Add a unit test asserting the “node image-only rollback impact” warning when only nodeOSUpgradeChannel is enabled.

Reviewed changes

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

File Description
src/azure-cli/azure/cli/command_modules/acs/custom.py Splits rollback warnings into separate upgradeChannel and nodeOSUpgradeChannel warning paths.
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_custom.py Adds unit test coverage for the nodeOSUpgradeChannel-only warning behavior.

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

Comment thread src/azure-cli/azure/cli/command_modules/acs/custom.py Outdated
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Comment thread src/azure-cli/azure/cli/command_modules/acs/custom.py Outdated
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@yanzhudd Julie Zhu (yanzhudd) changed the title [AKS] Fix node OS-only rollback warning [AKS] az aks nodepool rollback: Show an accurate warning when only the node OS upgrade channel is enabled Aug 6, 2026
@yanzhudd Julie Zhu (yanzhudd) changed the title [AKS] az aks nodepool rollback: Show an accurate warning when only the node OS upgrade channel is enabled {AKS} az aks nodepool rollback: Show an accurate warning when only the node OS upgrade channel is enabled Aug 6, 2026
@yanzhudd
Julie Zhu (yanzhudd) merged commit 5627454 into Azure:dev Aug 6, 2026
50 checks passed
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.

5 participants