Repository navigation
Azure Backup: Address PR #2116 follow-up review comments - #2429
Shraddha Jain (shrja-ms) merged 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Follow-up changes to the Azure Backup MCP toolset to align naming/options with repo conventions, remove unsupported policy retention inputs, and improve auto-detection error reporting.
Changes:
- Renames DR command group/command (
dr→disasterrecovery,enablecrr→enable-crr) and updates tests/docs accordingly. - Removes unsupported policy retention/scheduling options from options/interfaces/docs/tests and narrows policy create to daily retention inputs.
- Improves vault-type auto-detection error messaging for the RSV-auth-failed + DPP-not-found case; syncs vault get description to match behavior.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.UnitTests/Services/AzureBackupServiceTests.cs | Updates policy-create unit tests to match the simplified service signature. |
| tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.UnitTests/Policy/PolicyCreateCommandTests.cs | Updates mocks for new signature; adds tests asserting removed options are not present + serialization/auth cases. |
| tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.UnitTests/Governance/GovernanceFindUnprotectedCommandTests.cs | Renames --resource-group-filter to --resource-group and adds coverage for binding/serialization. |
| tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.UnitTests/Dr/DrEnableCrrCommandTests.cs | Updates command name to enable-crr and adds serialization validation. |
| tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.UnitTests/AzureBackupSetupTests.cs | Adds setup-level tests validating subgroup/command registration and renamed DR group. |
| tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.LiveTests/AzureBackupCommandTests.cs | Updates live tests to use renamed tool and updated resource-group argument name. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Services/RsvBackupOperations.cs | Removes an outdated TODO around returning job IDs for long polling. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Services/IAzureBackupService.cs | Simplifies CreatePolicyAsync and renames RG filter param for governance scan. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Services/AzureBackupService.cs | Removes unsupported-options validation, adapts calls to ops layer, and improves auto-detect error message. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Options/Policy/PolicyCreateOptions.cs | Removes unsupported schedule/retention properties. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Options/Governance/GovernanceFindUnprotectedOptions.cs | Removes old ResourceGroupFilter option property (now uses global ResourceGroup). |
| tools/Azure.Mcp.Tools.AzureBackup/src/Options/AzureBackupOptionDefinitions.cs | Removes option definitions for unsupported policy retention and old RG filter option. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Commands/Vault/VaultGetCommand.cs | Updates description to reflect optional RG filtering for listings. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Commands/Policy/PolicyCreateCommand.cs | Updates service call to match new CreatePolicyAsync parameters. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Commands/Governance/GovernanceFindUnprotectedCommand.cs | Switches to OptionDefinitions.Common.ResourceGroup.AsOptional() and binds via global name. |
| tools/Azure.Mcp.Tools.AzureBackup/src/Commands/Dr/DrEnableCrrCommand.cs | Renames command to enable-crr. |
| tools/Azure.Mcp.Tools.AzureBackup/src/AzureBackupSetup.cs | Renames subgroup dr → disasterrecovery for command registration. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Updates e2e prompts for renamed DR tool. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Syncs command reference for vault get text, policy create options, governance RG option rename, and DR section rename. |
There was a problem hiding this comment.
A few follow-ups on the rename effort:
-
servers/Azure.Mcp.Server/changelog-entries/shrja-add-azure-backup-toolset.yamlstill listsazurebackup_dr_enablecrrin the tools list. That entry hasn't been compiled into CHANGELOG.md yet, so when Drop1 actually ships, the published changelog will advertise a tool name that doesn't exist. Should beazurebackup_disasterrecovery_enable-crr. -
The command group was renamed to
disasterrecovery, butCommands/Dr/DrEnableCrrCommand.csand the corresponding tests folder kept theDrdirectory and class prefix. AGENTS.md specifies the{Resource}{Operation}Commandpattern, so directory should beDisasterRecovery/and classDisasterRecoveryEnableCrrCommand. Since this PR is specifically the naming-convention follow-up, worth finishing the rename at the C# layer too. -
src/Options/Policy/PolicyCreateOptions.csends with two blank lines before the closing brace after the retention property removal. Just a formatting leftover. -
(Informational)
IRsvBackupOperations.CreatePolicyAsyncandIDppBackupOperations.CreatePolicyAsyncstill acceptscheduleFrequency,weeklyRetentionWeeks,monthlyRetentionMonths, andyearlyRetentionYears, andAzureBackupServicenow passesnullfor all four. TheStage 2 TODOcomment inRsvBackupOperations.csexplains this is a deliberate placeholder for future multi-tier retention. Fine to leave, just noting since the user-facing options are gone.
The AutoDetectAndExecuteAsync error message fix looks good.
1204391 to
9a7b52d
Compare
Jon Gallant (jongio)
left a comment
There was a problem hiding this comment.
Checked my earlier review items against the latest push:
- Changelog entry updated to
azurebackup_disasterrecovery_enable-crr✓ - Command directory and class renamed to
DisasterRecovery/DisasterRecoveryEnableCrrCommand✓ - Trailing blank lines in
PolicyCreateOptions.cscleaned up ✓ IRsvBackupOperations/IDppBackupOperationsCreatePolicyAsyncsignatures trimmed toscheduleTime/dailyRetentionDaysonly, which also resolves the earlier note about passing null placeholder args through the ops layer ✓
One leftover from the rename in the live tests file, noted inline.
Follow-up to address deferred review comments from PR microsoft#2116 (Azure Backup MCP ToolSet - Drop1). Changes: - Rename command group dr -> disasterrecovery, command enablecrr -> enable-crr - Rename Commands/Dr/DrEnableCrrCommand -> Commands/DisasterRecovery/DisasterRecoveryEnableCrrCommand - Rename --resource-group-filter -> --resource-group (uses OptionDefinitions.Common.ResourceGroup) - Remove unsupported retention params (schedule-frequency, weekly/monthly/yearly retention) from public and internal ops interfaces - Fix VaultGetCommand description to reflect optional RG filtering - Fix AutoDetectAndExecuteAsync error message for RSV auth failure + DPP 404 - Update consolidated-tools.json, changelog entry, architecture.md, azmcp-commands.md, e2eTestPrompts.md - Fix PolicyCreateOptions trailing blank line - Rename live test methods/logs to match new naming conventions - Re-record live tests for renamed methods
9a7b52d to
f31dcbe
Compare
…crosoft#2429) Follow-up to address deferred review comments from PR microsoft#2116 (Azure Backup MCP ToolSet - Drop1). Changes: - Rename command group dr -> disasterrecovery, command enablecrr -> enable-crr - Rename Commands/Dr/DrEnableCrrCommand -> Commands/DisasterRecovery/DisasterRecoveryEnableCrrCommand - Rename --resource-group-filter -> --resource-group (uses OptionDefinitions.Common.ResourceGroup) - Remove unsupported retention params (schedule-frequency, weekly/monthly/yearly retention) - Fix VaultGetCommand description to reflect optional RG filtering - Fix AutoDetectAndExecuteAsync error message for RSV auth failure + DPP 404 - Update consolidated-tools.json, changelog entry, architecture.md, azmcp-commands.md, e2eTestPrompts.md - Remove NuGetAuditSuppress (packages now at patched 10.0.6) - Fix PolicyCreateOptions trailing blank line
Summary
Follow-up PR to address deferred review comments from PR #2116 (Azure Backup MCP ToolSet - Drop1).
Changes
dr->disasterrecovery,enablecrr->enable-crr- Command group and command renamed per naming conventions; docs, tests, and live test recordings updatedCommands/Dr/DrEnableCrrCommand->Commands/DisasterRecovery/DisasterRecoveryEnableCrrCommand- Directory and class follow the{Resource}{Operation}Commandpattern per AGENTS.md--resource-group-filter->--resource-group- UsesOptionDefinitions.Common.ResourceGroupto be consistent with other toolsets--schedule-frequency,--weekly-retention-weeks,--monthly-retention-months,--yearly-retention-yearsfrom command, public interface, internal ops interfaces (IRsvBackupOperations/IDppBackupOperations), and docs. Only--daily-retention-daysis currently supported.azmcp-commands.md,e2eTestPrompts.md,consolidated-tools.json, changelog entry, andarchitecture.mdTesting
dotnet format --verify-no-changespassesInvoking Livetests
Copilot submitted PRs are not trustworthy by default. Users with
writeaccess to the repo need to validate the contents of this PR before leaving a comment with the text/azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.