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

az-cli call azcopy to upload file to ADLS gen2 can`t handle the folder name with "#" #2559

Closed
leoliudan opened this issue Jan 31, 2024 · 1 comment

Comments

@leoliudan
Copy link

Which version of the AzCopy was used?

v10.23.0

Which platform are you using? (ex: Windows, Mac, Linux)

Linux

What command did you run?

az storage fs directory upload -f '$web' --account-name danadls2sa -s "/home/danliu/test/*" -d fhir_temp --recursive
az storage fs directory upload will call azcopy under ~/.azure/bin

Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.

What problem was encountered?

when there is "#" in folder name, it will failed to upload to ADLS gen2

danliu@dan2204vm:~$ ls -l test/hl7.terminology.r4#5.0.0/
total 0
-rw-rw-r-- 1 danliu danliu 0 Jan 31 09:56 1.txt

danliu@dan2204vm:~/.azure/bin$ /home/danliu/.azure/bin/azcopy -v
azcopy version 10.23.0

danliu@dan2204vm:~/.azure/bin$ az version
{
"azure-cli": "2.56.0",
"azure-cli-core": "2.56.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}

How can we reproduce the problem in the simplest way?

use the latest az-cli and azcopy version

check the azcopy log the URL construction is wrong for folder name hl7.terminology.r4#5.0.0
the ?resource=directory is in the middle.

PUT https://danadls2sa.dfs.core.windows.net/$web/fhir_temp/hl7.terminology.r4?resource=directory#5.0.0?se=2024-02-01T10%3A10%3A51Z&sig=-REDACTED-&sp=rwdlac&srt=co&ss=b&sv=2018-03-28

Have you found a mitigation/solution?

azcopy under 10.21.2 version is OK.
the azcopy 10.22.2 also has the same issue

58bd65c9-cd96-ae4c-7580-e2427f005ac8.log

@gapra-msft
Copy link
Member

Hi @leoliudan

I was able to reproduce this and it looks like this is related to an existing issue #2549

We have filed an issue against the azure-sdk-for-go. Once they have a fix released, we will be able to upgrade our dependency and resolve this issue. Since this is a duplicate issue, I'll go ahead and close this issue and we can track it via 2549 above.

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

No branches or pull requests

2 participants