Azure / Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
MIT License
1.8k stars 320 forks source link

Support putBlockFromUrl #699

Open MRayermannMSFT opened 3 years ago

MRayermannMSFT commented 3 years ago

Which service(blob, file, queue, table) does this issue concern?

Blob

Which version of the Azurite was used?

3.10.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm

What's the Node.js version?

12

What problem was encountered?

I tried using AzCopy v10 to do an emulator to emulator (service to service) copy of a block blob. AzCopy uses putBlockFromUrl when doing service to service copies.

Steps to reproduce the issue?

AzCopy could not perform the copy because putBlockFromUrl is unsupported by Azurite. Excerpt from AzCopy log:

2021/02/05 21:44:40 ==> REQUEST/RESPONSE (Try=2/3.845742ms, OpTime=1.252623221s) -- RESPONSE STATUS CODE ERROR
   PUT http://127.0.0.1:10000/devstoreaccount1/test/Bud%20IDs.txt?blockid=nddkztnmyjqtzdu3my1imdqwltvhmgitndywnmewotbinwe3&comp=block&se=2022-02-06t21%3A14%3A00z&sig=-REDACTED-&sp=rwdl&sr=c&st=2020-02-05t21%3A14%3A00z&sv=2018-03-28&timeout=901
   Content-Length: [0]
   User-Agent: [AzCopy/10.7.0 Azure-Storage/0.10 (go1.13; darwin)]
   X-Ms-Client-Request-Id: [29d4cd07-3334-418c-725d-7cd063226987]
   X-Ms-Copy-Source: [http://127.0.0.1:10000/devstoreaccount1/test/Bud%20IDs.txt?se=2022-02-06t21%3a14%3a00z&sig=-REDACTED-&snapshot=2021-02-05t21%3a31%3a14.382z&sp=rwdl&sr=c&st=2020-02-05t21%3a14%3a00z&sv=2018-03-28]
   X-Ms-Source-Range: [bytes=0-678]
   X-Ms-Version: [2019-12-12]
   --------------------------------------------------------------------------------
   RESPONSE Status: 500 Current API is not implemented yet. Please vote your wanted features to https://github.com/azure/azurite/issues
   Connection: [keep-alive]
   Content-Type: [application/xml]
   Date: [Fri, 05 Feb 2021 21:44:40 GMT]
   Server: [Azurite-Blob/3.10.0]
   X-Ms-Error-Code: [APINotImplemented]
   X-Ms-Request-Id: [ad476d4f-3549-464a-b218-4ee188b54292]
Response Details: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Error>   <Code>APINotImplemented</Code>   <Message>Current API is not implemented yet. Please vote your wanted features to https://github.com/azure/azurite/issues </Message> 

Have you found a mitigation/solution?

Use the old .NET emulator.

blueww commented 3 years ago

@MRayermannMSFT

Azurite still not support StageBlockFromURI. We will evaluate it.

We welcome contribution! It would be great it you can raise a PR to add the support. You can reference CopyBlobFromURI and stageBlock , to implement stageBlockFromURL

MRayermannMSFT commented 3 years ago

@blueww have y'all had a chance to further evaluate the priority of this issue yet?

blueww commented 3 years ago

@MRayermannMSFT We still don't have enough bandwith to implement this.

We welcome contribution! It would be great it you can raise a PR to implement it.