Skip to content

Conversation

@bragi92
Copy link
Member

@bragi92 bragi92 commented Jul 18, 2025


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

Related command

az aks create/update --enable-azure-monitor-metrics and related Azure Monitor metrics commands

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 July 18, 2025 23:05
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jul 18, 2025

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

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

Hi @bragi92,
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.

Copy link
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

This PR modernizes the AKS preview extension's Azure Monitor metrics functionality by migrating from custom implementation code to using the main Azure CLI infrastructure. The changes remove local azuremonitormetrics modules and update imports to use the main CLI's equivalent functionality.

  • Removes entire azuremonitormetrics module implementation from aks-preview extension
  • Updates imports to reference azure.cli.command_modules.acs.azuremonitormetrics instead of local modules
  • Adds raw_parameters argument to rp_registrations function call to align with main CLI interface

Reviewed Changes

Copilot reviewed 17 out of 22 changed files in this pull request and generated 1 comment.

File Description
azuremonitorprofile.py Updates imports to use main CLI modules and adds raw_parameters to rp_registrations call
Multiple module files Complete removal of local azuremonitormetrics implementation files

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 18, 2025

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

@github-actions
Copy link

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

github-actions bot commented Jul 18, 2025

Hi @bragi92

Release Suggestions

Module: aks-preview

  • Please log updates into to src/aks-preview/HISTORY.rst
  • Update VERSION to 18.0.0b28 in src/aks-preview/setup.py

Notes

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Member

@bragi92, could you please help fix the failed CI checks? Please manually update the API version from 2025-05-01 to 2025-06-02-preview in the corresponding recording files or rerun the live test to generate new recording files.

      raise AssertionError(ex)

E AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_with_azuremonitormetrics.yaml') in your current record mode ('once').
E No match for the request (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2025-05-01>) was found.
E Found 9 similar requests with 1 different matcher(s) :
E
E 1 - (<Request (GET) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000001?api-version=2025-06-02-preview>)..)
E Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
E Matchers failed :
E _custom_request_query_matcher - assertion failure :
E None

https://dev.azure.com/azclitools/public/_build/results?buildId=264264&view=logs&j=155127ab-52f1-52e7-0e45-625d9d7884a4&t=4bb67950-ef03-52d4-44f5-d1a8cd56c919&l=3864

@FumingZhang
Copy link
Member

@bragi92, could you please fix the failed CI checks?

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Member

somehow the recording test could not pass, I would recommend you mark the tests as @live_only() as a workaround

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@FumingZhang
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@yanzhudd yanzhudd changed the title [AKS] az aks create\update: use main cli for prometheus addon [AKS] az aks create/update: Use main cli for prometheus addon Aug 29, 2025
@yanzhudd
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@yanzhudd yanzhudd merged commit a14c3c3 into Azure:main Aug 29, 2025
25 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