Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to move blob to virtual directory with az storage fs file move #27800

Open
williamoconnorme opened this issue Nov 8, 2023 · 2 comments
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Milestone

Comments

@williamoconnorme
Copy link

Describe the bug

When attempting to move a blob file within the same container to a new virtual path, an error is returned regarding its parent directory not existing. Blobs can only be moved to the root of the container

Command toe reproduce:
az storage fs file move --file-system "myContainer" --path "myfile.json" --new-path "myContainer/myFolder/myfile.json

Related command

az storage fs file move

Errors

The parent directory of the destination path does not exist.
ErrorCode:RenameDestinationParentPathNotFound

Issue script & Debug output

az storage fs file move --file-system "myContainer" --path "myfile.json" --new-path "myContainer/myFolder/myfile.json

Expected behavior

File should be moved/renamed with virtual path prefixed.

Environment Summary

{
"azure-cli": "2.53.1",
"azure-cli-core": "2.53.1",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"aks-preview": "0.5.161",
"azure-devops": "0.25.0",
"interactive": "0.5.3",
"storage-preview": "0.8.3"
}
}

Additional context

The documentation for az storage blob move states that az storage fs file move should be used as the former command is deprecated however there is not parity in functionality when moving a blob from one path to another virtual directory.

https://learn.microsoft.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-move

@williamoconnorme williamoconnorme added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 8, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage az storage labels Nov 8, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 8, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 8, 2023

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added this to the Backlog milestone Nov 8, 2023
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 8, 2023
@calvinhzy
Copy link
Member

I think the default behavior would not create a new directory . Can you first run az storage fs directory create --account-name storageaccountname --file-system containername -n myFolder
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Projects
None yet
Development

No branches or pull requests

4 participants