Migrate Storage Sync tools to new tool design and fix bugs in missing options#2950
Merged
alzimmermsft merged 2 commits intoJun 25, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the Azure Storage Sync toolset to the newer “options POCO + [Option] attribute” design and updates commands to the SubscriptionCommand<TOptions, TResult> pattern, while also addressing a missing --tags option behavior for Storage Sync Service create/update flows.
Changes:
- Converted Storage Sync option classes from
System.CommandLine-styleOptionDefinitionsto attribute-based option binding ([Option],[OptionContainer]). - Updated Storage Sync commands to use
SubscriptionCommand<..., ...>and adjusted service contracts (notablytagstypes). - Updated tests/recorded-assets metadata and live/integration test inputs for the new tags format.
Reviewed changes
Copilot reviewed 67 out of 67 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/StorageSyncCommandTests.cs | Updates live/integration test to pass tags using the new key=value format. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/SyncGroup/SyncGroupGetCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/SyncGroup/SyncGroupDeleteCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/SyncGroup/SyncGroupCreateCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceUpdateCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceGetCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceDeleteCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceCreateCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/ServerEndpoint/ServerEndpointUpdateCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/ServerEndpoint/ServerEndpointGetCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/ServerEndpoint/ServerEndpointDeleteCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/ServerEndpoint/ServerEndpointCreateCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/RegisteredServer/RegisteredServerUpdateCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/RegisteredServer/RegisteredServerUnregisterCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/RegisteredServer/RegisteredServerGetCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/CloudEndpoint/CloudEndpointTriggerChangeDetectionCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/CloudEndpoint/CloudEndpointGetCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/CloudEndpoint/CloudEndpointDeleteCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/CloudEndpoint/CloudEndpointCreateCommandTests.cs | Switches unit test base to subscription-aware test base. |
| tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/assets.json | Updates recorded test asset tag pointer. |
| tools/Azure.Mcp.Tools.StorageSync/src/StorageSyncJsonContext.cs | Simplifies json source-gen context to file-scoped partial declaration. |
| tools/Azure.Mcp.Tools.StorageSync/src/Services/StorageSyncService.cs | Aligns update tags type to Dictionary<string, string> and simplifies tag assignment. |
| tools/Azure.Mcp.Tools.StorageSync/src/Services/IStorageSyncService.cs | Updates service contract to accept Dictionary<string, string> tags for update operations. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/SyncGroup/SyncGroupGetOptions.cs | Migrates sync group get options to [Option] attribute binding + subscription option interface. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/SyncGroup/SyncGroupDeleteOptions.cs | Migrates sync group delete options to [Option] attribute binding + subscription option interface. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/SyncGroup/SyncGroupCreateOptions.cs | Migrates sync group create options to [Option] attribute binding + subscription option interface. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncService/StorageSyncServiceUpdateOptions.cs | Migrates update options to attribute binding and changes tags input to a string form. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncService/StorageSyncServiceGetOptions.cs | Migrates get/list options to attribute binding and adds option-level validation rules. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncService/StorageSyncServiceDeleteOptions.cs | Migrates delete options to attribute binding with required fields. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncService/StorageSyncServiceCreateOptions.cs | Migrates create options to attribute binding and changes tags input to a string form. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncOptionDescriptions.cs | Adds centralized option description constants for the new attribute-based model. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/StorageSyncOptionDefinitions.cs | Removes old System.CommandLine option definitions. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/ServerEndpoint/ServerEndpointUpdateOptions.cs | Migrates server endpoint update options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/ServerEndpoint/ServerEndpointGetOptions.cs | Migrates server endpoint get options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/ServerEndpoint/ServerEndpointDeleteOptions.cs | Migrates server endpoint delete options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/ServerEndpoint/ServerEndpointCreateOptions.cs | Migrates server endpoint create options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/RegisteredServer/RegisteredServerUpdateOptions.cs | Migrates registered server update options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/RegisteredServer/RegisteredServerUnregisterOptions.cs | Migrates unregister options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/RegisteredServer/RegisteredServerGetOptions.cs | Migrates get/list options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/CloudEndpoint/CloudEndpointTriggerChangeDetectionOptions.cs | Migrates change detection options to attribute binding (including array inputs). |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/CloudEndpoint/CloudEndpointGetOptions.cs | Migrates cloud endpoint get/list options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/CloudEndpoint/CloudEndpointDeleteOptions.cs | Migrates cloud endpoint delete options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/CloudEndpoint/CloudEndpointCreateOptions.cs | Migrates cloud endpoint create options to attribute binding. |
| tools/Azure.Mcp.Tools.StorageSync/src/Options/BaseStorageSyncOptions.cs | Removes legacy base options type (now replaced by ISubscriptionOption POCOs). |
| tools/Azure.Mcp.Tools.StorageSync/src/GlobalUsings.cs | Removes global System.CommandLine using (no longer needed). |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/SyncGroup/SyncGroupGetCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/SyncGroup/SyncGroupDeleteCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/SyncGroup/SyncGroupCreateCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/StorageSyncService/StorageSyncServiceUpdateCommand.cs | Migrates command to SubscriptionCommand<,> and adds tags string parsing at call site. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/StorageSyncService/StorageSyncServiceGetCommand.cs | Migrates command to SubscriptionCommand<,> and moves resource-group/name validation into ValidateOptions. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/StorageSyncService/StorageSyncServiceDeleteCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/StorageSyncService/StorageSyncServiceCreateCommand.cs | Migrates command to SubscriptionCommand<,> and adds tags string parsing at call site. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/ServerEndpoint/ServerEndpointUpdateCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/ServerEndpoint/ServerEndpointGetCommand.cs | Migrates command to SubscriptionCommand<,> and updates help text for correct option usage. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/ServerEndpoint/ServerEndpointDeleteCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/ServerEndpoint/ServerEndpointCreateCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/RegisteredServer/RegisteredServerUpdateCommand.cs | Migrates command to SubscriptionCommand<,> and retains “update” call path. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/RegisteredServer/RegisteredServerUnregisterCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/RegisteredServer/RegisteredServerGetCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/CloudEndpoint/CloudEndpointTriggerChangeDetectionCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/CloudEndpoint/CloudEndpointGetCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/CloudEndpoint/CloudEndpointDeleteCommand.cs | Migrates command to SubscriptionCommand<,> and attribute-bound options. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/CloudEndpoint/CloudEndpointCreateCommand.cs | Migrates command to SubscriptionCommand<,> and streamlines response creation. |
| tools/Azure.Mcp.Tools.StorageSync/src/Commands/BaseStorageSyncCommand.cs | Removes old base command wrapper (no longer needed with attribute-based options). |
| tools/Azure.Mcp.Tools.StorageSync/src/Azure.Mcp.Tools.StorageSync.csproj | Switches core project reference to $(RepoRoot) form and removes direct System.CommandLine package ref. |
| servers/Azure.Mcp.Server/changelog-entries/1782412345167.yaml | Adds breaking-change changelog entry for removed parameters. |
| servers/Azure.Mcp.Server/changelog-entries/1782412330746.yaml | Adds bug-fix changelog entry for missing tags option (contains a typo). |
Comments suppressed due to low confidence (2)
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceCreateCommandTests.cs:22
- This test suite only asserts command metadata and does not cover the modified option binding/validation and tag parsing behavior (e.g., --tags parsing and invalid formats). Add unit tests that validate parsing of tags into the expected dictionary and that malformed tag strings produce a validation error response.
tools/Azure.Mcp.Tools.StorageSync/tests/Azure.Mcp.Tools.StorageSync.Tests/Commands/StorageSyncService/StorageSyncServiceUpdateCommandTests.cs:18 - This test suite only asserts command metadata and does not cover the modified option binding/validation and tag parsing behavior (e.g., --tags parsing and invalid formats). Add unit tests that validate parsing of tags into the expected dictionary and that malformed tag strings produce a validation error response.
KarishmaGhiya
approved these changes
Jun 25, 2026
1 task
21 tasks
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.
What does this PR do?
Migrates Storage Sync tools to new design where Register and Bind options are based on
Optionattributes. And fixes missing tags option instoragesync_service_createtool.GitHub issue number?
[Link to the GitHub issue this PR addresses]Pre-merge Checklist
servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentationREADME.mdchanges running the script./eng/scripts/Process-PackageReadMe.ps1. See Package READMEToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test promptsconsolidated-tools.jsonbreaking-changelabelservers/Azure.Mcp.Server/docs/azmcp-commands.md./eng/scripts/Update-AzCommandsMetadata.ps1to update tool metadata inazmcp-commands.md(required for CI)servers/Azure.Mcp.Server/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline