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

No error reported downloading non-existent blob #1931

Closed
gabe-microsoft opened this issue Oct 18, 2022 · 6 comments
Closed

No error reported downloading non-existent blob #1931

gabe-microsoft opened this issue Oct 18, 2022 · 6 comments
Assignees
Milestone

Comments

@gabe-microsoft
Copy link

Which version of the AzCopy was used?

10.16.1

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

Linux: Ubuntu 20.04.1 (kernel 5.15.0-1021-azure)

What command did you run?

Download a non-existent blob (login not required, same behavior is using SAS token):

azcopy login
azcopy cp https://storageacct.blob.core.windows.net/container/path/to/non/existent/blob .

What problem was encountered?

I would expect AzCopy to report an error and exit with a non-zero code since the requested blob does not exist. However, it returns with a successful (0) exit code with the following output:

INFO: Scanning...
INFO: Authenticating to source using Azure AD
INFO: Any empty folders will not be processed, because source and/or destination doesn't have full folder support

Job 0f75537c-c53d-044e-6109-8357cc86191e has started
Log file is located at: /home/azureuser/.azcopy/0f75537c-c53d-044e-6109-8357cc86191e.log

100.0 %, 0 Done, 0 Failed, 0 Pending, 0 Skipped, 0 Total,


Job 0f75537c-c53d-044e-6109-8357cc86191e summary
Elapsed Time (Minutes): 0.0333
Number of File Transfers: 0
Number of Folder Property Transfers: 0
Total Number of Transfers: 0
Number of Transfers Completed: 0
Number of Transfers Failed: 0
Number of Transfers Skipped: 0
TotalBytesTransferred: 0
Final Job Status: Completed
@gapra-msft
Copy link
Member

@tasherif-msft please take a look

@tasherif-msft
Copy link
Contributor

Hi @gabe-microsoft I am able to repro this - I will consult with the team regarding this behavior and the next steps as this would be a breaking change. I will keep you posted

@marc-hb
Copy link

marc-hb commented Dec 12, 2022

I reproduced something similar in #1975. I think the "to-reproduce" github label should be removed and replaced by "bug".

@tasherif-msft
Copy link
Contributor

@marc-hb I have changed the label to improvement. This was something initially done by design - if the file/dir does not exist assume success and show 0 transfers happened. We are now changing the approach to if single file doesn't exist report failure. There's a draft PR atm.

@marc-hb
Copy link

marc-hb commented Dec 13, 2022

Do you mean pattern matching / globbing was performed even with a single file argument? I'm just curious.

There's a draft PR atm.

URL?

@tasherif-msft
Copy link
Contributor

PR has been merged #1981

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

6 participants