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

Azure correctly creates the blob, but Azurite returns CannotVerifyCopySource (404) #2499

Open
caioluis opened this issue Nov 11, 2024 · 5 comments
Assignees
Labels
blob-storage featureparity Tracking issues for catching up feature parity

Comments

@caioluis
Copy link

Summary

Using Azure Blob Storage on the cloud, I can create a new blob from a url with no problem. However, using Azurite, get an error saying "CannotVerifyCopySource", status code 404.

I'm trying to verify if the issue lies in Azurite itself or the Rust SDK. In the Rust code example I set, I'm using the SDK's copy_from_url to copy a cat image from thecatapi cdn into the Azure blob storage container.

Versions

I'm using azurite's latest docker container image (azure-storage/azurite:latest) as of November 11th, 2024.
Azure Rust SDKs version 0.21.0

Steps to reproduce

I created a dummy project that can help reproducing the error. You just need to change the environment variables to test either on Azure or Azurite. As a second option, here are the steps:

  1. Run an Azurite container.
  2. Use Copy blob from URL operation.
  3. Verify if the 404 error persists
  4. Change the environment variables to repeat the same operations on Azure cloud
  5. Verify if the blob is created.

Additional information

I haven't found any workaround yet. There are some hypothesis around the copy not being implemented as I have seen in other GitHub issues, but in those situations, users get an error message saying it is not implemented yet, which is not the case this time.

@blueww blueww added blob-storage featureparity Tracking issues for catching up feature parity labels Nov 12, 2024
@blueww
Copy link
Member

blueww commented Nov 12, 2024

@caioluis

It looks you are trying to copy a blob from Uri "https://cdn2.thecatapi.com/images/0XYvRd7oD.jpg".
Azurite only support copy blob with source/dest inside same Azurite instance, see https://github.com/Azure/Azurite#:~:text=Snapshot%20Blob-,Copy%20Blob,-(Only%20supports%20copy
So currently this is by design in Azurite.

If you would like to create that blob with the content in the Uri, please first download it to local disk, then upload to Azurite. Then you can copy the blob inside same Azurite instance.

@caioluis
Copy link
Author

Thanks for the fast response @blueww. Is there any ongoing PR for this parity? I would like to contribute if I have the required knowledge to. Cheers

@blueww
Copy link
Member

blueww commented Nov 14, 2024

Thanks for your willing for contribution!

I don't remember any on-going PR for this.
The implementation of copy from outside will be much different from copy inside Azurite instance.

As there are so many customer using Azurite in different ways, any unstable or inaccurate error message will very possibly get customer issues. So please make sure:

  1. the error (e.g. when copy fail from outside Azurite) is as clear/actionable as possible
  2. If any copy source support by product Azure can't be support by Azurite, please doc it (in Readme) and have error message to cover it.

@onionhammer
Copy link

This would be very useful; currently it's fairly inefficient to download and copy a bunch of data, and ideally you wouldnt have to write two different versions of your code; one to run locally (with azurite) and one to run against a normal azure storage account.

@caioluis
Copy link
Author

I will certainly contribute on this, @onionhammer, but I won't say it will be fast. I'll likely begin on January.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blob-storage featureparity Tracking issues for catching up feature parity
Projects
None yet
Development

No branches or pull requests

4 participants