Skip to content

Azure Backup: Address PR #2116 follow-up review comments - #2429

Merged
Shraddha Jain (shrja-ms) merged 1 commit into
microsoft:mainfrom
shrja-ms:users/shrja/AzureBackup-Drop1-followup
Apr 17, 2026
Merged

Shraddha Jain (shrja-ms) merged 1 commit into
microsoft:mainfrom
shrja-ms:users/shrja/AzureBackup-Drop1-followup

Conversation

@shrja-ms

@shrja-ms Shraddha Jain (shrja-ms) commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up PR to address deferred review comments from PR #2116 (Azure Backup MCP ToolSet - Drop1).

Changes

  1. Rename dr -> disasterrecovery, enablecrr -> enable-crr - Command group and command renamed per naming conventions; docs, tests, and live test recordings updated
  2. Rename Commands/Dr/DrEnableCrrCommand -> Commands/DisasterRecovery/DisasterRecoveryEnableCrrCommand - Directory and class follow the {Resource}{Operation}Command pattern per AGENTS.md
  3. Rename --resource-group-filter -> --resource-group - Uses OptionDefinitions.Common.ResourceGroup to be consistent with other toolsets
  4. Remove unsupported retention parameters - Removed --schedule-frequency, --weekly-retention-weeks, --monthly-retention-months, --yearly-retention-years from command, public interface, internal ops interfaces (IRsvBackupOperations/IDppBackupOperations), and docs. Only --daily-retention-days is currently supported.
  5. Fix VaultGetCommand description - Removed incorrect 'regardless of resource group' statement; description now reflects optional RG filtering
  6. Fix AutoDetectAndExecuteAsync error message - Tracks RSV auth failure and produces a more accurate error message when RSV returns 401/403 but DPP returns 404
  7. Sync docs - Updated azmcp-commands.md, e2eTestPrompts.md, consolidated-tools.json, changelog entry, and architecture.md
  8. Fix PolicyCreateOptions trailing blank line

Testing

  • Build: 0 warnings, 0 errors (both toolset and full server)
  • Unit tests: 329/329 passed
  • Live tests (playback): 43/43 passed (re-recorded for renamed methods)
  • Formatting: dotnet format --verify-no-changes passes

Invoking Livetests

Copilot submitted PRs are not trustworthy by default. Users with write access 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jongio Jon Gallant (jongio) left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few follow-ups on the rename effort:

  1. servers/Azure.Mcp.Server/changelog-entries/shrja-add-azure-backup-toolset.yaml still lists azurebackup_dr_enablecrr in 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 be azurebackup_disasterrecovery_enable-crr.

  2. The command group was renamed to disasterrecovery, but Commands/Dr/DrEnableCrrCommand.cs and the corresponding tests folder kept the Dr directory and class prefix. AGENTS.md specifies the {Resource}{Operation}Command pattern, so directory should be DisasterRecovery/ and class DisasterRecoveryEnableCrrCommand. Since this PR is specifically the naming-convention follow-up, worth finishing the rename at the C# layer too.

  3. src/Options/Policy/PolicyCreateOptions.cs ends with two blank lines before the closing brace after the retention property removal. Just a formatting leftover.

  4. (Informational) IRsvBackupOperations.CreatePolicyAsync and IDppBackupOperations.CreatePolicyAsync still accept scheduleFrequency, weeklyRetentionWeeks, monthlyRetentionMonths, and yearlyRetentionYears, and AzureBackupService now passes null for all four. The Stage 2 TODO comment in RsvBackupOperations.cs explains 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

@shrja-ms
Shraddha Jain (shrja-ms) force-pushed the users/shrja/AzureBackup-Drop1-followup branch 2 times, most recently from 1204391 to 9a7b52d Compare April 17, 2026 04:43
@shrja-ms
Shraddha Jain (shrja-ms) enabled auto-merge (squash) April 17, 2026 05:27

@jongio Jon Gallant (jongio) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.cs cleaned up ✓
  • IRsvBackupOperations / IDppBackupOperations CreatePolicyAsync signatures trimmed to scheduleTime / dailyRetentionDays only, 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
@shrja-ms
Shraddha Jain (shrja-ms) merged commit 8141cd5 into microsoft:main Apr 17, 2026
16 checks passed
Colby Timm (colbytimm) pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Apr 25, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants