Azure / Azurite

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

GetBlob on archive tier blob should fail #2473

Open kfcss opened 5 days ago

kfcss commented 5 days ago

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

Blob

Which version of the Azurite was used?

3.31.0

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

Docker. From mcr.microsoft.com/azure-storage/azurite:3.31.0

What's the Node.js version?

As in the container. It is v20.10.0.

What problem was encountered?

GetBlob on an archive tier blob succeeded. It should fail.

Steps to reproduce the issue?

  1. Upload a block blob
  2. Change tier to archive
  3. GetBlob succeeds, which it should not according to the documentation.

A Get Blob operation on an archived block blob will fail. Ref: https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob#remarks

The debug log contains request made with Azure Storage Explorer and might contain requests for listing blobs as well. debug.log

Have you found a mitigation/solution?

No

blueww commented 5 days ago

@kfcss

Thanks for raising this issue! It looks archive tier fail request still no implemented in Azurite. The function need update is https://github.com/Azure/Azurite/blob/cd8cbd0cc4d0a092ed5a61d90c8dc2d251ee4e8b/src/blob/handlers/BlobHandler.ts#L64

Azurite welcome contribution! It would be great if you could raise a PR to fix this.