-
Notifications
You must be signed in to change notification settings - Fork 176
Using ARG query to support Aks resource read operations #424
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
base: main
Are you sure you want to change the base?
Conversation
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 PR updates the AKS tool to eliminate its dependency on Azure.ResourceManager.ContainerService by migrating to Azure Resource Graph queries. This change reduces the MCP agent size by approximately 1.27 MB while maintaining the same functionality.
- Replaced direct ARM API calls with Azure Resource Graph queries for better performance
- Removed Azure.ResourceManager.ContainerService dependency to reduce package size
- Added new model classes to handle JSON deserialization from Resource Graph responses
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 8 comments.
Show a summary per file
File | Description |
---|---|
tools/Azure.Mcp.Tools.Aks/src/Azure.Mcp.Tools.Aks.csproj | Removed Azure.ResourceManager.ContainerService package dependency |
tools/Azure.Mcp.Tools.Aks/src/Services/AksService.cs | Migrated from ARM API calls to Resource Graph queries using BaseAzureResourceService |
tools/Azure.Mcp.Tools.Aks/src/Services/Models/*.cs | Added new model classes for JSON deserialization from Resource Graph results |
tools/Azure.Mcp.Tools.Aks/src/Commands/*.cs | Updated error handling to support KeyNotFoundException from Resource Graph queries |
core/Azure.Mcp.Core/src/Services/Azure/BaseAzureResourceService.cs | Made resourceGroup parameter nullable to support querying across all resource groups |
servers/Azure.Mcp.Server/CHANGELOG.md | Documented the refactoring changes |
tools/Azure.Mcp.Tools.Aks/src/Services/Models/AksNetworkProfile.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Aks/src/Services/Models/AksManagedClusterSku.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Aks/src/Services/Models/AksClusterProperties.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Aks/src/Services/Models/AksAgentPoolProperties.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Aks/src/Services/Models/AksAgentPoolProfile.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Aks/src/Services/Models/AksAgentPoolData.cs
Outdated
Show resolved
Hide resolved
@@ -1,297 +0,0 @@ | |||
# PowerShell script to check for unused properties in Services/Models that are not used in Models mapping |
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.
Remove this script as it does not reliably detect unused resource properties in a generic manner.
@@ -23,8 +23,6 @@ internal sealed class SqlDatabaseProperties | |||
public DateTimeOffset? CreatedOn { get; set; } | |||
/// <summary> The current service level objective name of the database. </summary> | |||
public string? CurrentServiceObjectiveName { get; set; } | |||
/// <summary> The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. </summary> | |||
public string? LicenseType { get; set; } |
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.
Unused
Is there any consistency issue by switching to ARG? Per my understanding, there may be latencies there and hence some data may not be quired back immediately after new operations and hence may introduce confusion/troubles for scenarios like troubleshooting. /hold |
Hey @feiskyer, what I know the consistency issue has been resolved and is no longer a concern. Latency remains a known issue, but it's not specific to ARG, so I don't believe it's a blocker. |
Fixed aks tests.
What does this PR do?
This PR addresses part of the issue tracked in #226 by updating the SQL tool to eliminate its dependency on Azure.ResourceManager.ContainerService.
As a result, it reduces the MCP agent size by approximately 1.27 MB.
GitHub issue number?
#226
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.md
and/orservers/Fabric.Mcp.Server/CHANGELOG.md
for product changes (features, bug fixes, UI/UX, updated dependencies
)servers/Azure.Mcp.Server/README.md
and/orservers/Fabric.Mcp.Server/README.md
documentation/docs/azmcp-commands.md
and/or/docs/fabric-commands.md
ToolDescriptionEvaluator
and obtained a score of0.4
or more and a top 3 ranking for all related test prompts/docs/e2eTestPrompts.md
crypto mining, spam, data exfiltration, etc.
)/azp run mcp - pullrequest - live
to run Live Test Pipeline