Add AMLFS expansion job commands - #3344
Add AMLFS expansion job commands#3344Rebecca (Makar) McHugh (rebecca-makar) wants to merge 1 commit into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Adds Azure Managed Lustre (AMLFS) expansion job support to the ManagedLustre toolset, enabling users to create, query/list, and delete expansion jobs to resize filesystem capacity, with accompanying serialization, docs, consolidated-tool mappings, and tests.
Changes:
- Added
fs expansion {create|get|delete}commands (options, models, command registration) plus AOT-safe JSON serialization entries. - Extended
ManagedLustreService/IManagedLustreServicewith expansion job ARM operations and model mapping. - Updated docs (
azmcp-commands.md,e2eTestPrompts.md), consolidated tool mappings, changelog entry, and recorded/live test coverage & sanitizers.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/Azure.Mcp.Tools.ManagedLustre/tests/test-resources.bicep | Updates test infra (subnet outbound behavior, AMLFS zone, adds RP Reader role assignment). |
| tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.Tests/ManagedLustreCommandTests.cs | Updates sanitization and adds recorded lifecycle coverage for expansion jobs. |
| tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.Tests/FileSystem/ExpansionJob/ExpansionJobGetCommandTests.cs | Unit tests for get/list expansion jobs. |
| tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.Tests/FileSystem/ExpansionJob/ExpansionJobDeleteCommandTests.cs | Unit tests for deleting expansion jobs. |
| tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.Tests/FileSystem/ExpansionJob/ExpansionJobCreateCommandTests.cs | Unit tests for creating expansion jobs. |
| tools/Azure.Mcp.Tools.ManagedLustre/tests/Azure.Mcp.Tools.ManagedLustre.Tests/assets.json | Updates recordings tag for published test proxy assets. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Services/ManagedLustreService.cs | Implements expansion job create/get/list/delete and maps SDK resource to response model. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Services/IManagedLustreService.cs | Adds expansion job methods to service contract. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Options/ManagedLustreOptionDescriptions.cs | Adds option descriptions for expansion job name and new size. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Options/FileSystem/ExpansionJob/ExpansionJobGetOptions.cs | New options for get/list expansion jobs. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Options/FileSystem/ExpansionJob/ExpansionJobDeleteOptions.cs | New options for deleting an expansion job. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Options/FileSystem/ExpansionJob/ExpansionJobCreateOptions.cs | New options for creating an expansion job. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Models/ExpansionJob.cs | Adds response model types for expansion job payloads. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/ManagedLustreSetup.cs | Registers expansion commands and command group (fs expansion). |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Commands/ManagedLustreJsonContext.cs | Registers expansion command results/models for source-generated JSON serialization. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Commands/FileSystem/ExpansionJob/ExpansionJobGetCommand.cs | New command implementation for get/list expansion jobs. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Commands/FileSystem/ExpansionJob/ExpansionJobDeleteCommand.cs | New command implementation for deleting expansion jobs. |
| tools/Azure.Mcp.Tools.ManagedLustre/src/Commands/FileSystem/ExpansionJob/ExpansionJobCreateCommand.cs | New command implementation for creating expansion jobs. |
| servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | Maps new tools into consolidated “get/create/manage” groupings and updates description. |
| servers/Azure.Mcp.Server/docs/e2eTestPrompts.md | Adds E2E prompts for expansion create/get/list/delete tools. |
| servers/Azure.Mcp.Server/docs/azmcp-commands.md | Documents the new azmcp managedlustre fs expansion command set. |
| servers/Azure.Mcp.Server/changelog-entries/remakar-amlfs-expansion-jobs.yml | Changelog entry for the new expansion job feature. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
77beef1 to
95fb9f4
Compare
Add create, get, and delete operations for AMLFS expansion jobs, including command registration, documentation, recorded lifecycle tests, and required test-resource permissions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
95fb9f4 to
f6f3720
Compare
| | managedlustre_fs_expansion_create | Create an expansion job to increase the storage capacity of the Azure Managed Lustre filesystem <filesystem_name> to <new_size_tib> TiB in resource group <resource_group_name> | none | | ||
| | managedlustre_fs_expansion_get | Get the details of expansion job <job_name> for the Azure Managed Lustre filesystem <filesystem_name> in resource group <resource_group_name> | none | | ||
| | managedlustre_fs_expansion_get | List all expansion jobs for the Azure Managed Lustre filesystem <filesystem_name> in resource group <resource_group_name> | none | | ||
| | managedlustre_fs_expansion_delete | Delete the expansion job <job_name> for the Azure Managed Lustre filesystem <filesystem_name> in resource group <resource_group_name> | none | |
There was a problem hiding this comment.
nit: keep the prompts in alphabetical order
| Required options: | ||
| - filesystem-name: The name of the AMLFS filesystem | ||
| - new-size: The new storage capacity in TiB after expansion | ||
| - resource-group: The resource group containing the filesystem | ||
| - subscription: The subscription containing the filesystem |
There was a problem hiding this comment.
This information should be known to the agent via the tool input schema definition, I don't think we need to include this in the tool's description.
| await _service.DeleteExpansionJobAsync( | ||
| options.Subscription!, | ||
| options.ResourceGroup, | ||
| options.FilesystemName, | ||
| options.ExpansionJobName, | ||
| options.Tenant, | ||
| options.RetryPolicy, | ||
| cancellationToken); | ||
|
|
||
| context.Response.Results = ResponseResult.Create(new(options.ExpansionJobName, "Deleted"), ManagedLustreJsonContext.Default.ExpansionJobDeleteResult); |
There was a problem hiding this comment.
A more recent pattern in these types of operations is for the service to return a bool to indicate if anything was deleted and the response message to be handled accordingly. Ex, don't fail when nothing is deleted but do mention that nothing was deleted.
|
|
||
| namespace Azure.Mcp.Tools.ManagedLustre.Models; | ||
|
|
||
| public class ExpansionJob |
There was a problem hiding this comment.
nit: make all these records as they're simple response models.
| private List<HeaderRegexSanitizer>? _headerRegexSanitizers; | ||
| private List<BodyKeySanitizer>? _bodyKeySanitizers; | ||
| private List<GeneralRegexSanitizer>? _generalRegexSanitizers; | ||
| private List<UriRegexSanitizer>? _uriRegexSanitizers; |
There was a problem hiding this comment.
Is this needed?
What does this PR do?
Adds create, get/list, and delete commands for Azure Managed Lustre expansion jobs so users can increase filesystem storage capacity and monitor expansion progress.
The change includes:
Official Azure CLI reference: https://learn.microsoft.com/cli/azure/amlfs/expansion?view=azure-cli-latest
GitHub issue number?
N/A
Validation
Azure.Mcp.Tools.ManagedLustre.Tests_72f369d8cc.Invoking 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.