Migrate Deploy tools to new tool design#3090
Open
alzimmermsft wants to merge 1 commit into
Open
Conversation
alzimmermsft
requested review from
KarishmaGhiya,
RickWinter,
hallipr,
jairmyree,
tmeschter,
vukelich and
xirzec
July 17, 2026 21:42
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the Deploy toolset commands from the legacy RegisterOptions/BindOptions pattern to the newer options binding model driven by [Option] attributes, aligning Deploy with the repo’s current command design.
Changes:
- Converted Deploy command option models to
[Option]-attributed POCOs and updated commands to the newerBaseCommand<TOptions, TResult>/SubscriptionCommand<TOptions, TResult>execute signatures. - Removed legacy option-definition helpers (
DeployOptionDefinitions,JsonSchemaLoader,GlobalUsings,System.CommandLinedependency) and refactored supporting utilities. - Updated tests, docs, and added a changelog entry reflecting breaking parameter surface changes.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.Deploy/tests/Azure.Mcp.Tools.Deploy.Tests/Commands/Pipeline/GuidanceGetCommandTests.cs | Updates tests to reflect new options binding and removed subscription arg. |
| tools/Azure.Mcp.Tools.Deploy/tests/Azure.Mcp.Tools.Deploy.Tests/Commands/Architecture/DiagramGenerateCommandTests.cs | Updates expected validation error message for invalid JSON input. |
| tools/Azure.Mcp.Tools.Deploy/tests/Azure.Mcp.Tools.Deploy.Tests/Commands/App/LogsGetCommandTests.cs | Switches to subscription-aware unit test base to match command inheritance changes. |
| tools/Azure.Mcp.Tools.Deploy/src/Services/Util/PipelineGenerationUtil.cs | Renames/normalizes AZD option property usage (IsAzdProject). |
| tools/Azure.Mcp.Tools.Deploy/src/Services/Util/JsonSchemaLoader.cs | Removes embedded-resource schema loading helper (deleted). |
| tools/Azure.Mcp.Tools.Deploy/src/Services/Util/IaCRulesTemplateUtil.cs | Simplifies helper methods and removes unused parameters. |
| tools/Azure.Mcp.Tools.Deploy/src/Services/Util/DeploymentPlanTemplateUtil.cs | Refactors string comparisons and simplifies some helper methods. |
| tools/Azure.Mcp.Tools.Deploy/src/Services/Util/AzdResourceLogService.cs | Adds missing file header and updates Azure Monitor logs namespace usage. |
| tools/Azure.Mcp.Tools.Deploy/src/Services/Util/AzdAppLogRetriever.cs | Modernizes collection initializations and simplifies small helpers. |
| tools/Azure.Mcp.Tools.Deploy/src/Services/Templates/TemplateService.cs | Removes trailing whitespace-only line. |
| tools/Azure.Mcp.Tools.Deploy/src/Schemas/DeployAppTopologySchema.cs | Adds a compiled-in schema string to replace embedded schema loading. |
| tools/Azure.Mcp.Tools.Deploy/src/Options/Plan/GetOptions.cs | Migrates plan options to [Option] attributes and adds subscription/resource-group options. |
| tools/Azure.Mcp.Tools.Deploy/src/Options/Pipeline/GuidanceGetOptions.cs | Migrates pipeline guidance options to [Option] attributes and renames AZD flag property. |
| tools/Azure.Mcp.Tools.Deploy/src/Options/Infrastructure/RulesGetOptions.cs | Migrates IaC rules options to [Option] attributes and adjusts required/optional fields. |
| tools/Azure.Mcp.Tools.Deploy/src/Options/DeployOptionDefinitions.cs | Removes legacy option-definition container (deleted). |
| tools/Azure.Mcp.Tools.Deploy/src/Options/Architecture/DiagramGenerateOptions.cs | Migrates raw JSON input option to [Option] attributes using the new schema constant. |
| tools/Azure.Mcp.Tools.Deploy/src/Options/App/LogsGetOptions.cs | Migrates app logs options to [Option] attributes and implements subscription option interface. |
| tools/Azure.Mcp.Tools.Deploy/src/Models/PipelineParameters.cs | Adds file header. |
| tools/Azure.Mcp.Tools.Deploy/src/Models/IaCRulesParameters.cs | Adds file header. |
| tools/Azure.Mcp.Tools.Deploy/src/GlobalUsings.cs | Removes global usings tied to the old design (deleted). |
| tools/Azure.Mcp.Tools.Deploy/src/Commands/Plan/GetCommand.cs | Converts to the new execute signature and defaults option values when absent. |
| tools/Azure.Mcp.Tools.Deploy/src/Commands/Pipeline/GuidanceGetCommand.cs | Converts to the new execute signature and removes legacy binding/registration. |
| tools/Azure.Mcp.Tools.Deploy/src/Commands/Infrastructure/RulesGetCommand.cs | Converts to the new execute signature and adjusts resource-types parsing. |
| tools/Azure.Mcp.Tools.Deploy/src/Commands/Infrastructure/GenerateMermaidChart.cs | Refactors naming and simplifies helper methods. |
| tools/Azure.Mcp.Tools.Deploy/src/Commands/DeployJsonContext.cs | Simplifies JSON context declaration to file-scoped type form. |
| tools/Azure.Mcp.Tools.Deploy/src/Commands/Architecture/DiagramGenerateCommand.cs | Moves validation into ValidateOptions and updates execution flow for new binding. |
| tools/Azure.Mcp.Tools.Deploy/src/Commands/App/LogsGetCommand.cs | Updates to SubscriptionCommand<TOptions, TResult> pattern and uses subscription resolver. |
| tools/Azure.Mcp.Tools.Deploy/src/Azure.Mcp.Tools.Deploy.csproj | Removes System.CommandLine dependency and adjusts ProjectReference pathing. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Updates schema reference link for architecture diagram command (currently broken). |
| servers/Azure.Mcp.Server/changelog-entries/1784324484568.yaml | Adds breaking-change entry for Deploy parameter surface updates. |
| } | ||
| return Task.FromResult(context.Response); | ||
|
|
||
| return context.Response; |
| HandleException(context, ex); | ||
| } | ||
| return Task.FromResult(context.Response); | ||
| return context.Response; |
| HandleException(context, ex); | ||
| } | ||
| return Task.FromResult(context.Response); | ||
| return context.Response; |
| } | ||
|
|
||
| return Task.FromResult(context.Response); | ||
| return context.Response; |
| [--limit <limit>] | ||
|
|
||
| # Generate a mermaid architecture diagram for the application topology follow the schema defined in [deploy-app-topology-schema.json](../areas/deploy/src/AzureMcp.Deploy/Schemas/deploy-app-topology-schema.json) | ||
| # Generate a mermaid architecture diagram for the application topology follow the schema defined in [DeployAppTopologySchema.cs](./tools/Azure.Mcp.Deploy/src/Schemas/DeployAppTopologySchema.cs) |
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 Deploy tools to new design where Register and Bind options are based on
Optionattributes.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