apache / apache/opendal

tracking: re-enable Azurite If-Match stat/read tests after missing-target parity fix

Open
#8,177 0 comments 1 reaction 0 assignees View on GitHub
services/azblob
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

### Summary

Track an Azurite compatibility gap for conditional stat and read on a missing blob. When `If-Match` contains a valid ETag obtained from another blob, the live Azure Blob Storage service returns `404 BlobNotFound`, while Azurite returns `412 ConditionNotMet`.

This is an Azurite parity issue, not an OpenDAL or Azure Blob Storage capability limitation.

### Verified behavior

Reproduced with raw Shared Key REST requests using `x-ms-version: 2022-11-02`. The condition used a valid ETag returned after creating another blob in the same container.

| Backend | Version | HEAD missing blob | GET missing blob |
| --- | --- | --- | --- |
| Azure Blob Storage | live service | `404 BlobNotFound` | `404 BlobNotFound` |
| Azurite | 3.35.0 | `412 ConditionNotMet` | `412 ConditionNotMet` |
| Azurite | 3.37.0 | `412 ConditionNotMet` | `412 ConditionNotMet` |

A synthetic malformed ETag is not an equivalent reproduction: Azure Storage may itself return `412` for that input. The parity difference is observable when both requests use an ETag issued by the service.

Upstream report: https://github.com/Azure/Azurite/issues/2751

### OpenDAL handling

OpenDAL's portable stat/read contract preserves `NotFound` when the target does not exist, including when `if_match` is set. The Azure Blob Storage backend satisfies this contract against the live service and should continue advertising `stat_with_if_match` and `read_with_if_match`.

Until Azurite matches Azure Storage, its behavior-test configuration should override only these emulator capabilities:

```text
stat_with_if_match=false,read_with_if_match=false
```

Do not disable the Azure Blob Storage backend capabilities globally. Do not add a client-side existence probe: it would add another request and introduce a time-of-check/time-of-use race.

### Completion criteria

- Azurite releases a fix for Azure/Azurite#2751.
- OpenDAL updates its Azurite test version to a fixed release.
- Missing-target conditional stat and read behavior tests pass against Azurite.
- The two Azurite-only capability overrides are removed.

Related to #8168.

AI assisted with the live-service comparison and drafting. The contributor directed the scope and conclusion.

Contributor guide

Open the contributing guide

Research direction

Start with the Azurite behavior-test configuration and the two capability overrides described in the issue, then check the upstream Azurite issue and release status. Done means updating to a fixed Azurite release, removing only the stat and read overrides, and confirming the missing-target conditional behavior tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, rust
Domain
backend, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.