Azure / Azurite

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

Delete retention policy not working as expected #417

Open JasonYeMSFT opened 4 years ago

JasonYeMSFT commented 4 years ago

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

blob

Which version of the Azurite was used?

3.2.0-preview

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

npm

What's the Node.js version?

v10.16.3

What problem was encountered?

as titled

Steps to reproduce the issue?

  1. Configure delete retention policy api to enable soft delete (200 OK)
  2. Delete a blob (200 OK)
  3. List blob including deleted ones
  4. The deleted blob isn't there

    Have you found a mitigation/solution?

    Nope

Here are the requests I used to reproduce the issue: configure:

PUT http://127.0.0.1:10000/devstoreaccount1/?comp=properties&restype=service HTTP/1.1
content-type: application/xml;charset="utf-8"
content-length: 176
x-ms-client-request-id: adae2790-6257-11ea-beaa-b72d28d2bc0b
user-agent: Microsoft Azure Storage Explorer, 1.12.0, win32, Azure-Storage/2.10.3 (NODE-VERSION v10.11.0; Windows_NT 10.0.18363)
x-ms-version: 2018-03-28
x-ms-date: Mon, 09 Mar 2020 22:45:30 GMT
accept: application/atom+xml,application/xml
Accept-Charset: UTF-8
authorization: SharedKey devstoreaccount1:yEwi66GPeI19sNt0/Rf9wAQcJMu5cGR/2lONyfSacp4=
host: 127.0.0.1:10000
Connection: keep-alive

<?xml version="1.0" encoding="utf-8"?><StorageServiceProperties><DeleteRetentionPolicy><Enabled>true</Enabled><Days>30</Days></DeleteRetentionPolicy></StorageServiceProperties>

delete:

DELETE http://127.0.0.1:10000/devstoreaccount1/test1/fc075edd-07d7-9144-4efb-941252e69025--00000.steV10 HTTP/1.1
x-ms-client-request-id: f4b649e0-6259-11ea-add5-759c990ca7f3
user-agent: Microsoft Azure Storage Explorer, 1.12.0, win32, Azure-Storage/2.10.3 (NODE-VERSION v10.11.0; Windows_NT 10.0.18363)
x-ms-version: 2018-03-28
x-ms-date: Mon, 09 Mar 2020 23:01:48 GMT
accept: application/atom+xml,application/xml
Accept-Charset: UTF-8
content-type: 
content-length: 0
authorization: SharedKey devstoreaccount1:QUF3Y6eupU8y4kH9LTScrC43LXd7uL0DmTpghK6JHuc=
host: 127.0.0.1:10000
Connection: keep-alive
blueww commented 4 years ago

@JasonYeMSFT

Thanks for reporting this ! But Soft Delete is still not supported by Azurite, you can find it in the list of "Following features or REST APIs are NOT supported or limited supported in this release" in https://github.com/Azure/Azurite. Currently although azurite don't block set DeleteRetentionPolicy, it won't take effect.

We will track this feature with other new features.