-
Notifications
You must be signed in to change notification settings - Fork 340
Add azmcp storage datalake directory list-paths command #639
Conversation
Co-authored-by: xiangyan99 <[email protected]>
Co-authored-by: xiangyan99 <[email protected]>
Co-authored-by: xiangyan99 <[email protected]>
ValidateRequiredParameters(accountName, fileSystemName, directoryName, subscriptionId); | ||
|
||
var dataLakeServiceClient = await CreateDataLakeServiceClient(accountName, tenant, retryPolicy); | ||
var fileSystemClient = dataLakeServiceClient.GetFileSystemClient(fileSystemName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be using GetDirectoryClient(directoryName)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 6ca4341. Updated the StorageService to use dataLakeServiceClient.GetDirectoryClient(fileSystemName, directoryName)
directly instead of going through the file system client.
|
||
public async Task<List<DataLakePathInfo>> ListDataLakeDirectoryPaths( | ||
string accountName, | ||
string fileSystemName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ListDataLakeDirectoryPaths does not need the input fileSystemName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 00c8399. Removed the fileSystemName parameter and updated the method to accept a directoryPath that includes the file system (e.g., "filesystem/directory"). The method now parses this path internally to extract the file system and directory components.
docs/azmcp-commands.md
Outdated
# List paths in a Data Lake directory | ||
azmcp storage datalake directory list-paths --subscription <subscription> \ | ||
--account-name <account-name> \ | ||
--file-system-name <file-system-name> \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file-system-name is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 00c8399. Removed the --file-system-name parameter from the command. The directory-name parameter now accepts a full path including the file system (e.g., "filesystem/directory").
… code review Co-authored-by: xiangyan99 <[email protected]>
RetryPolicyOptions? retryPolicy = null); | ||
Task<List<DataLakePathInfo>> ListDataLakeDirectoryPaths( | ||
string accountName, | ||
string fileSystemName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fileSystemName is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've already removed the fileSystemName parameter from the interface in commit 00c8399. The method now takes a directoryPath parameter that includes both filesystem and directory (e.g., "filesystem/directory"). Internally, we parse this to get the fileSystemName and directoryName for the Azure SDK's GetDirectoryClient method. Could you clarify what specific fileSystemName reference should be removed?
…requested in code review Co-authored-by: xiangyan99 <[email protected]>
Implements a new command to list paths within a specific directory in Azure Data Lake Storage Gen2, complementing the existing file-system level path listing.
Changes Made
Core Implementation
azmcp storage datalake directory list-paths
--account-name
(required): Storage account name--file-system-name
(required): Data Lake file system name--directory-name
(required): Directory within the file system--subscription
(required): Azure subscription--tenant
(optional): Azure tenant IDTechnical Details
StorageOptionDefinitions.Directory
option definitionBaseDirectoryOptions
extendingBaseFileSystemOptions
DirectoryListPathsCommand
usingDataLakeDirectoryClient.GetPathsAsync()
ListDataLakeDirectoryPaths()
method toIStorageService
andStorageService
directory
understorage datalake
Key Difference from Existing Command
The existing
azmcp storage datalake file-system list-paths
lists all paths at the file system root level usingDataLakeFileSystemClient
. This new command usesDataLakeDirectoryClient
to list paths within a specific directory, enabling more granular exploration of Data Lake hierarchies.Testing & Documentation
azmcp-commands.md
with command syntax and examplesResult Format
Returns the same
DataLakePathInfo
structure as the file-system command:Fixes #638.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
1oavsblobprodcus350.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)1p7vsblobprodcus324.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)4zjvsblobprodcus390.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)7tjvsblobprodcus341.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)d0svsblobprodcus381.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)fdpvsblobprodcus345.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)gbsvsblobprodcus365.vsblob.vsassets.io
dotnet restore --no-cache
(dns block)gervsblobprodcus329.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)h6tvsblobprodcus346.vsblob.vsassets.io
dotnet build
(dns block)imzvsblobprodcus368.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)jrqvsblobprodcus343.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)k0ivsblobprodcus356.vsblob.vsassets.io
dotnet build
(dns block)k4kvsblobprodcus344.vsblob.vsassets.io
dotnet restore --no-cache
(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js
(dns block)kh4vsblobprodcus325.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)kxqvsblobprodcus376.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)l7avsblobprodcus319.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)ljcvsblobprodcus317.vsblob.vsassets.io
dotnet build
(dns block)m16vsblobprodcus374.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)pdfvsblobprodcus380.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)pe3vsblobprodcus354.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)pe4vsblobprodcus351.vsblob.vsassets.io
dotnet build
(dns block)rcxvsblobprodcus328.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)sqdvsblobprodcus333.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)st8vsblobprodcus339.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)u3hvsblobprodcus371.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)ukkvsblobprodcus352.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)x3yvsblobprodcus370.vsblob.vsassets.io
dotnet build
(dns block)dotnet restore --no-cache
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.