bug(services/s3): Silo and MinIO ignore conditional headers on CopyObject

Open
#9,413 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
backend, databases

Research direction

Start with the S3 service capability declarations, the Silo and MinIO CI overrides, and the behavior tests named in the report: test_copy_with_if_not_exists_to_existing_file, test_copy_with_if_match_mismatch, and test_copier_with_if_not_exists_to_existing_file. Compare CopyObject behavior with PutObject and CompleteMultipartUpload, then check the AWS API expectations. Done when the preset capabilities and CI documentation accurately reflect the reproduced behavior, with relevant tests passing.

Written by the indexing model from the issue text.

Description

bug services/s3
OpenDAL version or commit

main, commit 7d8274246

Affected service or component

services/s3 (MinIO preset) against Silo RELEASE.2026-09-16T00-00-00Z and MinIO RELEASE.2024-09-22T00-33-43Z

Describe the bug

The S3 service advertises copy_with_if_not_exists and copy_with_if_match. Silo and MinIO ignore If-None-Match: * and If-Match on CopyObject and overwrite the destination. They honor If-None-Match: * on PutObject and CompleteMultipartUpload. So a small copy overwrites silently, but a multipart copy is protected.

Steps to Reproduce
  1. Start the server from fixtures/s3. Create bucket test with objects src and dst.
  2. Copy onto dst:
    curl --aws-sigv4 "aws:amz:us-east-1:s3" --user minioadmin:minioadmin \
      -H "x-amz-content-sha256: UNSIGNED-PAYLOAD" -H "If-None-Match: *" \
      -H "x-amz-copy-source: /test/src" -X PUT http://127.0.0.1:9000/test/dst
    
  3. Repeat with -H 'If-Match: "x"'.
  4. Remove copy_with_if_not_exists=false,copy_with_if_match=false from the CI overrides and run OPENDAL_TEST=s3 cargo test --test behavior --features tests,services-s3 -- with_if.
Actual Behavior
  • Steps 2 and 3 return 200 OK. dst holds the source bytes.
  • test_copy_with_if_not_exists_to_existing_file and test_copy_with_if_match_mismatch fail on both servers. test_copier_with_if_not_exists_to_existing_file also fails on MinIO.
Expected Behavior

Steps 2 and 3 return 412 Precondition Failed and keep dst, as the AWS CopyObject API documents. Real AWS S3 was not tested.

Additional Context
  • The Silo and MinIO CI setups disable both capabilities. #7600 added these overrides without a reason, so CI hides the gap.
  • neon.md documents the same gap for Neon. minio.md does not.

Questions:

  1. Should the MinIO preset withhold both capabilities? An ignored precondition can lose data.
  2. Or should minio.md document the gap?
  3. Should the CI overrides state a reason?
Reproduction confirmation
  • I reproduced this issue against the actual service.

This comment is AI assisted.

Dominant language
Rust
Stars
5.5k
Forks
869
Avg merge
8h 2m
Merged PRs (30d)
862

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/opendal

All issues in apache/opendal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.