Azure / azure-sdk-for-rust

This repository is for active development of the *unofficial* Azure SDK for Rust. This repository is *not* supported by the Azure SDK team.
MIT License
692 stars 241 forks source link

azure-sdk returns CoreError when deleting objects on Azurite #780

Open manoj-joseph opened 2 years ago

manoj-joseph commented 2 years ago

Azurite does not support soft-delete. It seems that its API response does not tell us that the delete is permanent by including x-ms-delete-type-permanent in the response header. The azure-sdk looks for this header and on not finding it, returns an azure_storage::Error::CoreError even though the delete was successful.

The azure-sdk has some workarounds (azurite_workaround) for dealing with Azurite. It appears to be related to this issue (or an earlier incarnation of this issue. I turned this feature on. But alas, the workaround no longer works (if it ever did).

For reference, here is Azurite's console output:

127.0.0.1 - - [02/Jun/2022:18:55:18 +0000] "DELETE /devstoreaccount1/cloudburst-data-2/blob2.txt HTTP/1.1" 202 -

azure_core error:

CoreError(Other(Error { context: Message { kind: DataConversion, message: "could not find 'x-ms-delete-type-permanent' in headers" } }))

Versions: azure_core: 0.2.2 azure_identity: 0.3.0 azure_storage: 0.2.0 azure_storage_blobs: 0.2.0

azurite: 3.17.1

ahrens commented 1 year ago

Problem still exists in azure_storage_blobs 0.11.0 and azurite 3.23.0.