Skip to content

Split disk --tags on commas, as documented - #3999

Open
Federico Laurianti (Laurianti) wants to merge 2 commits into
microsoft:mainfrom
Laurianti:fix-disk-tags-comma
Open

Federico Laurianti (Laurianti) wants to merge 2 commits into
microsoft:mainfrom
Laurianti:fix-disk-tags-comma

Conversation

@Laurianti

@Laurianti Federico Laurianti (Laurianti) commented Oct 19, 2026 •

Copy link
Copy Markdown

What does this PR do?

compute disk create and compute disk update now split --tags on commas and trim keys and values, as documented and as compute vm update and compute vmss update already do. Before, env=prod,team=compute became a single tag, env = prod,team=compute. The disk sections of azmcp-commands.md now document comma-separated tags too.

Added DiskTagsServiceTests, which checks the tags sent for create and update with env=prod,team=compute and env=prod, team=compute. It fails without the fix.

Recordings to refresh: three recorded tests captured the bug and no longer match in playback, because the request now has the right tags:

  • DiskCreate_WithLocationAndTags_CreatesWithProperties
  • DiskUpdate_AddTags_UpdatesSuccessfully
  • DiskUpdate_CreateThenUpdateMultipleProperties_FullLifecycle
.tags.environment: "test" != "test,purpose=live-test"
.tags.purpose: Missing in request JSON

The other 40 recorded Compute tests pass in playback. I can't push to Azure/azure-sdk-assets, so these recordings need to be re-recorded by the team.

GitHub issue number?

Fixes #3998

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Created a changelog entry if the change falls among the following: new feature, bug fix, UI/UX update, breaking change, or updated dependencies. Follow the changelog entry guide
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes running the script ./eng/scripts/Process-PackageReadMe.ps1. See Package README
    • For new or modified tool descriptions (excluding Fabric MCP tools), ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For renamed tools, follow the Tool Rename Checklist and tag the PR with the breaking-change label
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated command list in servers/Azure.Mcp.Server/docs/azmcp-commands.md
    • Ran ./eng/scripts/Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • Updated test prompts in servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution Federico Laurianti (@Laurianti)! We will review the pull request and get back to you soon.

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.

🟡 Changes recommended

The command reference still prescribes space-separated tags, and the reported playback failures require refreshed recording assets.

2 open issues
What changed in this PR

Fixes #3998 by aligning Compute disk tag parsing with the documented comma-separated format and existing VM behavior.

Changes:

  • Split disk create/update tags on commas and trim keys and values.
  • Add request-level regression tests for both operations.
  • Add a bug-fix changelog entry.
File Description
tools/​Azure.Mcp.Tools.Compute/​tests/​Azure.Mcp.Tools.Compute.Tests/​Disk/​DiskTagsServiceTests.cs Tests comma-separated tags with optional whitespace.
tools/​Azure.Mcp.Tools.Compute/​src/​Services/​ComputeService.cs Corrects disk tag splitting and trimming.
servers/​Azure.Mcp.Server/​changelog-entries/​1792436742310.yaml Documents the parsing fix.

Review effort: Balanced

Comment thread tools/Azure.Mcp.Tools.Compute/src/Services/ComputeService.cs
Comment thread tools/Azure.Mcp.Tools.Compute/src/Services/ComputeService.cs
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.

[BUG] compute disk create/update split --tags on spaces instead of commas

2 participants