Skip to content

Conversation

@rebecca-makar
Copy link
Contributor

@rebecca-makar rebecca-makar commented Jan 13, 2026

What does this PR do?

AMLFS Import Create/Cancel/Get/Delete commands for mcp

[Any additional context, screenshots, or information that helps reviewers]

GitHub issue number?

[Link to the GitHub issue this PR addresses]

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
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • 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 using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, 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 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 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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- job-name: Name for the import job (auto-generated if not provided)
- conflict-resolution-mode: How to handle conflicting files (Fail, Skip, OverwriteIfDirty, OverwriteAlways)
- import-prefixes: Blob prefixes to import (comma-separated, imports all if not specified)
- maximum-errors: Maximum errors allowed before job failure (-1: infinite, 0: immediate exit, default: none)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are none and 0 the same thing here? Not knowing the REST API they seem the same to me, if not might be worth adding more description here.

Or, am I reading this wrong where the default is 0 but we decided to state none?

- filesystem-name: The name of the AMLFS filesystem
Optional options:
- job-name: Name for the import job (auto-generated if not provided)
- conflict-resolution-mode: How to handle conflicting files (Fail, Skip, OverwriteIfDirty, OverwriteAlways)
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the default here if not specified?

Comment on lines +294 to +308
public static readonly Option<bool> WaitForCompletionOption = new(
"--wait-for-completion"
)
{
Required = false,
Description = "Wait for the import operation to complete before returning. Default: false (return immediately after starting import)."
};

public static readonly Option<int> TimeoutMinutesOption = new(
"--timeout-minutes"
)
{
Required = false,
Description = "Maximum time in minutes to wait for import completion (only used when --wait-for-completion is true). Default: 60 minutes."
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe these are being used

{
throw new ArgumentException($"Invalid conflict resolution mode: {conflictResolutionMode}. Valid values: {string.Join(", ", validModes)}", nameof(conflictResolutionMode));
}
// Note: Setting this property will need to be implemented once we find the correct enum type
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be blocked from merging until this is done?

Comment on lines +1167 to +1174
catch (RequestFailedException rfe)
{
throw new Exception($"Failed to create import job for filesystem '{filesystemName}': {rfe.Message}", rfe);
}
catch (Exception ex)
{
throw new Exception($"Failed to create import job for filesystem '{filesystemName}': {ex.Message}", ex);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Given these do the same thing, should they just be merged into a single catch block.

Comment on lines +1208 to +1211
catch (RequestFailedException rfe) when (rfe.Status == 404)
{
throw new Exception($"Import job '{jobName}' not found for filesystem '{filesystemName}'", rfe);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to throw this as an error or return this as a success but with a message about the job not existing.

Throwing an error to delete a resource that doesn't exist feels off given the intended outcome still is the same.

Comment on lines +1239 to +1240
// Get the filesystem
var fs = await rg.GetAmlFileSystems().GetAsync(filesystemName, cancellationToken: cancellationToken);
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems we use different APIs and have different error handling for retrieval of the filesystem. Is this just an inconsistency that should be fixed or do we want this different behavior?

Comment on lines +1255 to +1257
// TotalBlobsErrored and TotalRequests may not be available in this SDK version
TotalBlobsErrored = null,
TotalRequests = null
Copy link
Contributor

Choose a reason for hiding this comment

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

If this information is unavailable at this time, do we want to have these fields existing? Seems to be a waste for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools-managedlustre Azure Managed Lustre

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

3 participants