Skip to content

[AKS] Fix AKS rollback auto-upgrade channel warning#33748

Open
InduSridhar wants to merge 1 commit into
Azure:devfrom
InduSridhar:indusridhar/fix-aks-rollback-channel-warning
Open

[AKS] Fix AKS rollback auto-upgrade channel warning#33748
InduSridhar wants to merge 1 commit into
Azure:devfrom
InduSridhar:indusridhar/fix-aks-rollback-channel-warning

Conversation

@InduSridhar

Copy link
Copy Markdown
Contributor

Related command
az aks nodepool rollback

Description
Fixes a false AKS rollback warning when auto-upgrade channels are disabled. The SDK channel values are string enums; str(NodeOSUpgradeChannel.NONE) returns NodeOSUpgradeChannel.NONE, so comparing str(enum).lower() with none incorrectly treats disabled channels as enabled.

This change compares the enum .value when present before deciding whether upgradeChannel or nodeOSUpgradeChannel is enabled.

Testing Guide

  • python3 -m py_compile src/azure-cli/azure/cli/command_modules/acs/custom.py
  • Verified enum comparison behavior locally with UpgradeChannel.NONE and NodeOSUpgradeChannel.NONE.

History Notes
[AKS] az aks nodepool rollback: Fix false auto-upgrade warning when upgrade channels are disabled.


  • 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.

Copilot AI review requested due to automatic review settings July 17, 2026 21:52
@InduSridhar
InduSridhar requested review from a team and FumingZhang as code owners July 17, 2026 21:52
@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jul 17, 2026

Copy link
Copy Markdown
️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.14
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
️✔️network
️✔️latest
️✔️3.12
️✔️3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
️✔️storage
️✔️latest
️✔️3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

@azure-pipelines

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

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jul 17, 2026

Copy link
Copy Markdown
️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

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 fixes a false warning in az aks nodepool rollback that incorrectly reported auto-upgrade as enabled when AKS SDK upgrade channel values are provided as string-enum types. It normalizes enum values before comparison so disabled channels like NONE are correctly treated as disabled.

Changes:

  • Normalize upgrade_channel / node_os_upgrade_channel by preferring an enum’s .value when present before evaluating enabled/disabled state.
  • Update the rollback warning to display the normalized channel values.

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

@yonzhan

yonzhan commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

AKS

@VeryEarly VeryEarly self-assigned this Jul 19, 2026
@VeryEarly

Copy link
Copy Markdown

/azp run

@azure-pipelines

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

@VeryEarly VeryEarly changed the title Fix AKS rollback auto-upgrade channel warning [Aks] Fix AKS rollback auto-upgrade channel warning Jul 19, 2026
@VeryEarly

Copy link
Copy Markdown

/azp run

@azure-pipelines

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

@FumingZhang FumingZhang changed the title [Aks] Fix AKS rollback auto-upgrade channel warning [AKS] Fix AKS rollback auto-upgrade channel warning Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants