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

Aperta
#9,413 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend, databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
5.5k
Fork
869
Merge medio
8h 2m
PR unite (30g)
862

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/opendal

Tutte le issue di apache/opendal

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.