Fix CI: revert GroupListCommand modification, follow Result naming convention#1975
Open
Fix CI: revert GroupListCommand modification, follow Result naming convention#1975
Conversation
…roup using GenericResource API Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement Azure.ResourceManager GenericResource for issue 1631
Add Mar 10, 2026
group resource list command using GenericResource API
Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
…up_resource_list tool Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Copilot
AI
changed the title
Add
Fix ServerStartCommandTests tool count assertions for group_resource_list
Mar 10, 2026
group resource list command using GenericResource API…lt type - Revert GroupListCommand.cs to match main (no modification needed) - Rename GroupResourceListCommand.Result to GroupResourceListCommandResult to follow the established naming convention (e.g. AccountCreateCommandResult) - Update GroupJsonContext to remove TypeInfoPropertyName workaround Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Copilot
AI
changed the title
Fix ServerStartCommandTests tool count assertions for group_resource_list
Fix CI: revert GroupListCommand modification, follow Result naming convention
Mar 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes CI/test playback by adopting the established JSON source-gen “unique Result type name” convention for the new group_resource_list command, avoiding the previous TypeInfoPropertyName workaround and keeping the existing group_list tool unchanged.
Changes:
- Add
group resource list(group_resource_list) command and register it under the Group area. - Introduce
GenericResourceInfo+IResourceGroupService.GetGenericResourcesimplementation for listing resources in a resource group. - Update JSON source-gen context, consolidated tool mapping, docs, and test expectations to include the new utility tool.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Expands consolidated “subscriptions and resource groups” tool to include group_resource_list. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds E2E prompts for group_resource_list. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents azmcp group resource list. |
| core/Microsoft.Mcp.Core/src/Models/Resource/GenericResourceInfo.cs | Adds a shared model for generic resource output. |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Group/UnitTests/GroupResourceListCommandTests.cs | Adds unit tests for the new command behavior. |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/Areas/Server/ServerStartCommandTests.cs | Updates tool-count assertions to account for the new utility tool. |
| core/Azure.Mcp.Core/src/Services/Azure/ResourceGroup/ResourceGroupService.cs | Implements resource listing within a resource group. |
| core/Azure.Mcp.Core/src/Services/Azure/ResourceGroup/IResourceGroupService.cs | Extends service contract with GetGenericResources. |
| core/Azure.Mcp.Core/src/Areas/Group/Options/ResourceListOptions.cs | Adds options type for the new command. |
| core/Azure.Mcp.Core/src/Areas/Group/GroupSetup.cs | Registers the new command under a resource subgroup. |
| core/Azure.Mcp.Core/src/Areas/Group/Commands/GroupResourceListCommand.cs | New group resource list command with uniquely named result type. |
| core/Azure.Mcp.Core/src/Areas/Group/Commands/GroupJsonContext.cs | Registers the new result type for source-generated JSON serialization. |
core/Azure.Mcp.Core/src/Areas/Group/Commands/GroupResourceListCommand.cs
Outdated
Show resolved
Hide resolved
| Task<List<ResourceGroupInfo>> GetResourceGroups(string subscriptionId, string? tenant = null, RetryPolicyOptions? retryPolicy = null, CancellationToken cancellationToken = default); | ||
| Task<ResourceGroupInfo?> GetResourceGroup(string subscriptionId, string resourceGroupName, string? tenant = null, RetryPolicyOptions? retryPolicy = null, CancellationToken cancellationToken = default); | ||
| Task<ResourceGroupResource?> GetResourceGroupResource(string subscriptionId, string resourceGroupName, string? tenant = null, RetryPolicyOptions? retryPolicy = null, CancellationToken cancellationToken = default); | ||
| Task<List<GenericResourceInfo>> GetGenericResources(string subscription, string resourceGroupName, string? tenant = null, RetryPolicyOptions? retryPolicy = null, CancellationToken cancellationToken = default); |
There was a problem hiding this comment.
IResourceGroupService uses subscriptionId as the parameter name for the other methods, but GetGenericResources introduces subscription. Align the parameter naming (either all subscription or all subscriptionId) to keep the public interface consistent and reduce confusion about whether IDs vs names are accepted.
Suggested change
| Task<List<GenericResourceInfo>> GetGenericResources(string subscription, string resourceGroupName, string? tenant = null, RetryPolicyOptions? retryPolicy = null, CancellationToken cancellationToken = default); | |
| Task<List<GenericResourceInfo>> GetGenericResources(string subscriptionId, string resourceGroupName, string? tenant = null, RetryPolicyOptions? retryPolicy = null, CancellationToken cancellationToken = default); |
…Command.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ourceGroupService.GetGenericResources Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IResourceGroupService.GetGenericResourcesusessubscriptionwhile other methods usesubscriptionIdIResourceGroupService.cs: rename parameter fromsubscriptiontosubscriptionIdfor consistency🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.