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

GetBlob on archive tier blob should fail #2473

Open
kfcss opened this issue Oct 8, 2024 · 1 comment
Open

GetBlob on archive tier blob should fail #2473

kfcss opened this issue Oct 8, 2024 · 1 comment
Assignees
Labels
alignment Alignment between Azurite with Azure Storage production blob-storage bug Something isn't working

Comments

@kfcss
Copy link

kfcss commented Oct 8, 2024

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 blueww self-assigned this Oct 8, 2024
@blueww blueww added the alignment Alignment between Azurite with Azure Storage production label Oct 8, 2024
@blueww blueww assigned blueww and unassigned blueww Oct 8, 2024
@blueww blueww added bug Something isn't working blob-storage labels Oct 8, 2024
@blueww
Copy link
Member

blueww commented Oct 8, 2024

@kfcss

Thanks for raising this issue!
It looks archive tier fail request still no implemented in Azurite.
The function need update is

public async download(

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

BrendonK pushed a commit to BrendonK/Azurite that referenced this issue Oct 24, 2024
BrendonK pushed a commit to BrendonK/Azurite that referenced this issue Oct 28, 2024
blueww added a commit that referenced this issue Dec 11, 2024
#2483)

* Added accessTier check to download call for BlobHandler.ts to fail on archived blobs.

#2473

* Updated sas.test.ts test to handle new error.detail.code for Archived blob failure.

#2473

* Update sas.test.ts to fix sql failure

* Update blob.test.ts

---------

Co-authored-by: BrendonKleinhans <[email protected]>
Co-authored-by: Wei Wei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alignment Alignment between Azurite with Azure Storage production blob-storage bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants