-
Couldn't load subscription status.
- Fork 348
Using ARG query to support Sql resource read operations #938
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 refactors the SQL tool to use Azure Resource Graph (ARG) queries instead of direct Azure Resource Manager (ARM) operations, eliminating the dependency on Azure.ResourceManager.Sql package and reducing the agent size by ~6.41 MB.
- Introduces BaseAzureResourceService for common Resource Graph query operations
- Replaces ARM-based SQL operations with Resource Graph queries
- Creates internal model classes to handle JSON deserialization from Resource Graph responses
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
core/src/AzureMcp.Core/Services/Azure/BaseAzureResourceService.cs |
New base service class providing common Resource Graph query functionality |
areas/sql/src/AzureMcp.Sql/Services/SqlService.cs |
Refactored to use BaseAzureResourceService and Resource Graph queries |
areas/sql/src/AzureMcp.Sql/Services/Models/*.cs |
New internal model classes for deserializing SQL resource data from JSON |
docs/new-command.md |
Updated documentation explaining when to use Resource Graph vs direct ARM operations |
areas/sql/tests/AzureMcp.Sql.LiveTests/SqlCommandTests.cs |
Updated tests to use case-insensitive string comparisons |
areas/sql/src/AzureMcp.Sql/Services/Models/SqlUserAssignedIdentity.cs
Outdated
Show resolved
Hide resolved
areas/sql/src/AzureMcp.Sql/Services/Models/SqlServerAadAdministratorProperties.cs
Outdated
Show resolved
Hide resolved
|
@copilot review this PR against checklist and guidance from new-command.md |
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.
Added consolidated review feedback referencing new-command.md checklist.
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
What does this PR do?
This PR addresses part of the issue tracked in #756 by updating the SQL tool to eliminate its dependency on Azure.ResourceManager.Sql.
As a result, it reduces the AzureMCP agent size by approximately 6.41 MB.
GitHub issue number?
#756
Pre-merge Checklist
CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies).\eng\common\spelling\Invoke-Cspell.ps1README.mddocumentation/docs/azmcp-commands.md/e2eTests/e2eTestPrompts.mdeng/tools/ToolDescriptionConfidenceScoretool and obtained a result >= 0.4crypto mining, spam, data exfiltration, etc.)/azp run azure - mcpto run Live Test Pipeline