{AKS} Fix monitoring addon key casing compatibility with azure-cli/acs#9741
{AKS} Fix monitoring addon key casing compatibility with azure-cli/acs#9741yanzhudd merged 2 commits intoAzure:mainfrom
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @FumingZhang, |
|
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>
|
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 |
There was a problem hiding this comment.
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_logsto callget_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. |
|
Hi @FumingZhang Release SuggestionsModule: aks-preview
Notes
|
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
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.