apache / apache/opendal

tracking: re-enable SeaweedFS conditional stat/read tests after S3 parity fix

Open
#8,178 1 comment 2 reactions 0 assignees View on GitHub
services/s3
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

### Summary

Track a SeaweedFS S3 compatibility gap for conditional stat and read on a missing object. When `If-Match` contains a valid ETag obtained from another object, or when `If-Unmodified-Since` is set, Amazon S3 preserves missing-object semantics while SeaweedFS returns `412 PreconditionFailed`.

This is a SeaweedFS S3 parity issue, not an OpenDAL S3 capability limitation.

### Verified behavior

Reproduced with AWS CLI requests against SeaweedFS 4.40 and the latest release, 4.44. The `If-Match` condition used a valid ETag returned after creating another object in the same bucket.

| Backend | Version | HEAD missing object | GET missing object |
| --- | --- | --- | --- |
| AWS S3 | live service, OpenDAL behavior CI | `NotFound` | `NotFound` |
| SeaweedFS | 4.40 | `412 PreconditionFailed` | `412 PreconditionFailed` |
| SeaweedFS | 4.44 | `412 PreconditionFailed` | `412 PreconditionFailed` |

Both SeaweedFS versions return `404` / `NoSuchKey` for the same missing object when no conditional header is present. SeaweedFS `master` still explicitly maps a missing entry with `If-Match` or `If-Unmodified-Since` to `ErrPreconditionFailed`.

Upstream report: https://github.com/seaweedfs/seaweedfs/issues/10984

### OpenDAL handling

OpenDAL's portable stat/read contract preserves `NotFound` when the target does not exist, including when `if_match` or `if_unmodified_since` is set. The S3 backend satisfies this contract against the live AWS service and should continue advertising these capabilities.

Until SeaweedFS matches AWS S3, its behavior-test configuration should override only these fixture capabilities:

```text
stat_with_if_match=false
stat_with_if_unmodified_since=false
read_with_if_match=false
read_with_if_unmodified_since=false
```

Do not disable the S3 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.

Current override: https://github.com/apache/opendal/blob/844ef5984c759008dec01b39d84ace47c30598db/.github/services/s3/seaweedfs_s3/action.yml#L38

### Completion criteria

- SeaweedFS releases a fix for seaweedfs/seaweedfs#10984.
- OpenDAL updates its SeaweedFS behavior-test image to a fixed release.
- Missing-target conditional stat and read behavior tests pass against SeaweedFS for both `If-Match` and `If-Unmodified-Since`.
- The four SeaweedFS-only capability overrides are removed.

Related to #8168 and #8172.

AI assisted with actual-service reproduction, source verification, and drafting. The contributor directed the scope and conclusion.

Contributor guide

Open the contributing guide

Research direction

Wait for SeaweedFS issue #10984 to be fixed and for OpenDAL to publish a behavior-test image using that release. Then inspect .github/services/s3/seaweedfs_s3/action.yml and the S3 behavior tests, run the missing-target conditional stat and read tests for If-Match and If-Unmodified-Since, and confirm they pass before removing the four SeaweedFS-only capability overrides.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, rust
Domain
backend, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.