-
Notifications
You must be signed in to change notification settings - Fork 1.5k
{AKS}: containerized aks-agent #9451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
❌Azure CLI Extensions Breaking Change Test
|
|
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>
|
|
7463aa5 to
6a1187e
Compare
6a1187e to
de30ba8
Compare
There was a problem hiding this 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 pull request removes test evaluation fixtures and mock data for the aks-agent extension, which are being deleted as part of containerizing the aks-agent functionality. The changes primarily involve the deletion of test case fixtures, mock responses, Kubernetes manifests, and supporting test infrastructure.
Key Changes
- Removal of 50+ test case directories containing evaluation fixtures for various AKS agent scenarios
- Deletion of mock responses, test manifests, and supporting scripts used for testing
- Elimination of test infrastructure including shell scripts for test orchestration
Reviewed changes
Copilot reviewed 295 out of 464 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Multiple test fixture directories (59, 58, 57, etc.) | Removed complete test case directories including YAML configs, manifests, and mock data |
Various .txt mock files |
Deleted mock kubectl command outputs and tool responses |
| Python log generation scripts | Removed test helper scripts for generating synthetic log data |
| Shell scripts | Deleted test orchestration and validation scripts |
|
|
||
| logger = get_logger(__name__) | ||
|
|
||
| # NOTE(mainred): we can use get_default_cli().invoke() to trigger `az aks get-credentials` to fetch the kubeconfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time we run the agent, we'll get the credential locally, to avoid redundant warning log from get_default_cli().invoke(), I switched to aks sdk instead. It makes sense in two parts.
- we dont have much code change but get-credential part, vendored sdk maintenance should not be a problem, as its dependency are mainly from system library. These code wont be touched normally.
- as a AKS extension, vendorring AKS sdk might not be a burden, in our command we requires the AKS cluster name and resource group
| ) | ||
| console = get_console() | ||
|
|
||
| console.print( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make the UI consistent in all aks-agent, we use prompkit console to the interactive input.
| help="Show AKS agent configuration and status information.", | ||
| ) | ||
|
|
||
| with self.argument_context("aks agent-init") as c: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides az aks agent-init, we also introduced az aks agent-cleanup to make sure az aks agent accepts a prompt from the user to do the investigation instead of using flags like --cleanup to miss the az aks agent up.
001dd68 to
889b7a8
Compare
889b7a8 to
c12deac
Compare
gossion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
This PR introduces breaking changes to aks-agent as planned. These breaking changes remove the holmesgpt dependency, in which a lot of third-party packages are imported, leading the installation slowness, and dynamic python package issues caused by version mismatch. Int this change, we removed the holmesgpt dependency. We have few customers using the extensions as announced the extension in less than on month, and breaking change must be taken regarding to the above considerations. |
|
[Release] Update index.json for extension [ aks-agent-1.0.0b12 ] : https://dev.azure.com/msazure/One/_build/results?buildId=146028638&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Architecture:

And the demo:
containerized AKS agent - asciinema.org
Related command
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.