Skip to content

{AKS} Fix monitoring addon key casing compatibility with azure-cli/acs#9741

Merged
yanzhudd merged 2 commits intoAzure:mainfrom
FumingZhang:fuming/aks-fix-0330
Mar 30, 2026
Merged

{AKS} Fix monitoring addon key casing compatibility with azure-cli/acs#9741
yanzhudd merged 2 commits intoAzure:mainfrom
FumingZhang:fuming/aks-fix-0330

Conversation

@FumingZhang
Copy link
Copy Markdown
Member


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

PR #33039 updated the official azure-cli to handle monitoring addon key casing differences. This change aligns aks-preview in cli-extensions with that fix to ensure consistent behavior.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI review requested due to automatic review settings March 29, 2026 23:41
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Mar 29, 2026

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @FumingZhang,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Mar 29, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

CodeGen Tools Feedback Collection

Thank 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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns aks-preview monitoring addon behavior with the upstream azure-cli/acs change that normalizes addon profile keys to lowercase, ensuring compatibility when the Azure API returns the monitoring addon key in camelCase (omsAgent).

Changes:

  • Reorders _setup_azure_monitor_logs to call get_enable_msi_auth_for_monitoring() before detecting the existing monitoring addon key, avoiding issues when the parent implementation normalizes keys in-place.
  • Updates the camelCase monitoring addon unit test to assert the normalized lowercase key (omsagent) and ensure no duplicate key exists.
  • Adds a HISTORY entry describing the fix.

Reviewed changes

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

File Description
src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py Updates the test expectations to match lowercase key normalization and validate no duplicate monitoring addon key is created.
src/aks-preview/azext_aks_preview/managed_cluster_decorator.py Adjusts _setup_azure_monitor_logs execution order to be compatible with upstream in-place key normalization behavior.
src/aks-preview/HISTORY.rst Documents the compatibility fix under Pending.

@github-actions
Copy link
Copy Markdown
Contributor

Hi @FumingZhang

Release Suggestions

Module: aks-preview

  • Update VERSION to 19.0.0b29 in src/aks-preview/setup.py

Notes

@yanzhudd yanzhudd merged commit c9666ae into Azure:main Mar 30, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AKS Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants