This is an automated email from the ASF dual-hosted git repository. Xuanwo pushed a commit to branch xuanwo/9413-conditional-copy-docs in repository https://gitbox.apache.org/repos/asf/opendal.git
commit a3f71257f4dc57d2f3871ec05714cd069c4d4b29 Author: Xuanwo <[email protected]> AuthorDate: Mon Nov 30 02:22:27 2026 +0100 docs(services/s3): document destination copy limits on MinIO and Silo Document the release-specific behavior reported by chitralverma in #9413 and the operator override that rejects affected copy options before dispatch. Explain the existing destination copy overrides in the pinned fixture actions. --- .github/services/minio/0_minio_s3/action.yml | 1 + .../minio/minio_s3_with_anonymous/action.yml | 1 + .github/services/s3/0_silo_s3/action.yml | 1 + .../services/s3/silo_s3_with_anonymous/action.yml | 1 + .../s3/silo_s3_with_list_objects_v1/action.yml | 1 + .../services/s3/silo_s3_with_versioning/action.yml | 1 + core/services/s3/src/compatible_services.md | 24 ++++++++++++++++++++++ core/services/s3/src/minio.md | 5 +++++ 8 files changed, 35 insertions(+) diff --git a/.github/services/minio/0_minio_s3/action.yml b/.github/services/minio/0_minio_s3/action.yml index 9c08a9c78b..4825f1de86 100644 --- a/.github/services/minio/0_minio_s3/action.yml +++ b/.github/services/minio/0_minio_s3/action.yml @@ -36,6 +36,7 @@ runs: - name: Setup shell: bash + # The pinned MinIO release ignores destination preconditions on CopyObject. run: | cat << EOF >> $GITHUB_ENV OPENDAL_MINIO_BUCKET=test diff --git a/.github/services/minio/minio_s3_with_anonymous/action.yml b/.github/services/minio/minio_s3_with_anonymous/action.yml index 440d13555d..f7b2536a74 100644 --- a/.github/services/minio/minio_s3_with_anonymous/action.yml +++ b/.github/services/minio/minio_s3_with_anonymous/action.yml @@ -42,6 +42,7 @@ runs: aws --endpoint-url http://127.0.0.1:9000/ s3api put-bucket-policy --bucket test --policy '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:GetBucketLocation","s3:ListBucket","s3:ListBucketMultipartUploads"],"Resource":["arn:aws:s3:::test"]},{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:GetObject","s3:PutObject","s3:DeleteObject","s3:AbortMultipartUpload","s3:ListMultipartUploadParts"],"Resource":["arn:aws:s3:::test/*"]}]}' - name: Setup shell: bash + # The pinned MinIO release ignores destination preconditions on CopyObject. run: | cat << EOF >> $GITHUB_ENV OPENDAL_MINIO_BUCKET=test diff --git a/.github/services/s3/0_silo_s3/action.yml b/.github/services/s3/0_silo_s3/action.yml index 6002f9531d..030a725dda 100644 --- a/.github/services/s3/0_silo_s3/action.yml +++ b/.github/services/s3/0_silo_s3/action.yml @@ -36,6 +36,7 @@ runs: - name: Setup shell: bash + # The pinned Silo release ignores destination preconditions on CopyObject. run: | cat << EOF >> $GITHUB_ENV OPENDAL_S3_BUCKET=test diff --git a/.github/services/s3/silo_s3_with_anonymous/action.yml b/.github/services/s3/silo_s3_with_anonymous/action.yml index 3389c81c5c..0f33cd1112 100644 --- a/.github/services/s3/silo_s3_with_anonymous/action.yml +++ b/.github/services/s3/silo_s3_with_anonymous/action.yml @@ -42,6 +42,7 @@ runs: aws --endpoint-url http://127.0.0.1:9000/ s3api put-bucket-policy --bucket test --policy '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:GetBucketLocation","s3:ListBucket","s3:ListBucketMultipartUploads"],"Resource":["arn:aws:s3:::test"]},{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:GetObject","s3:PutObject","s3:DeleteObject","s3:AbortMultipartUpload","s3:ListMultipartUploadParts"],"Resource":["arn:aws:s3:::test/*"]}]}' - name: Setup shell: bash + # The pinned Silo release ignores destination preconditions on CopyObject. run: | cat << EOF >> $GITHUB_ENV OPENDAL_S3_BUCKET=test diff --git a/.github/services/s3/silo_s3_with_list_objects_v1/action.yml b/.github/services/s3/silo_s3_with_list_objects_v1/action.yml index bf850e9233..acbb0b1d22 100644 --- a/.github/services/s3/silo_s3_with_list_objects_v1/action.yml +++ b/.github/services/s3/silo_s3_with_list_objects_v1/action.yml @@ -36,6 +36,7 @@ runs: - name: Setup shell: bash + # The pinned Silo release ignores destination preconditions on CopyObject. run: | cat << EOF >> $GITHUB_ENV OPENDAL_S3_BUCKET=test diff --git a/.github/services/s3/silo_s3_with_versioning/action.yml b/.github/services/s3/silo_s3_with_versioning/action.yml index aafbb32a02..c880514022 100644 --- a/.github/services/s3/silo_s3_with_versioning/action.yml +++ b/.github/services/s3/silo_s3_with_versioning/action.yml @@ -37,6 +37,7 @@ runs: - name: Setup shell: bash + # The pinned Silo release ignores destination preconditions on CopyObject. run: | cat << EOF >> $GITHUB_ENV OPENDAL_S3_BUCKET=test diff --git a/core/services/s3/src/compatible_services.md b/core/services/s3/src/compatible_services.md index e5548b068a..8d3f0f14f4 100644 --- a/core/services/s3/src/compatible_services.md +++ b/core/services/s3/src/compatible_services.md @@ -77,6 +77,30 @@ In particular, the Swift and lakeFS presets use the URI authority for the bucket and take the gateway URL in the `endpoint` option. The native Swift and lakeFS schemes use the authority for the endpoint. +### Destination conditions on copy + +A single `CopyObject` request can succeed without enforcing the destination +existence or ETag condition on these releases: + +- MinIO Community Edition `RELEASE.2024-09-22T00-33-43Z` +- Silo `RELEASE.2026-09-16T00-00-00Z` + +For an operator connected to one of these releases, disable both destination +copy capabilities. With this override, `copy_with` and `copier_with` return +[`ErrorKind::Unsupported`](opendal_core::ErrorKind::Unsupported) before sending +a request when `if_not_exists` is enabled or `if_match` is set. + +```rust +# fn disable_destination_copy_conditions(op: opendal_core::Operator) -> opendal_core::Result<opendal_core::Operator> { +use opendal_core::layers::CapabilityOverrideLayer; + +let op = op.layer(CapabilityOverrideLayer::from_overrides( + "copy_with_if_not_exists=false,copy_with_if_match=false", +)?); +# Ok(op) +# } +``` + ### Copy with metadata replacement `copy_with_user_metadata`, `copy_with_content_type` and `copy_with_content_language` are enabled for every endpoint. They send `CopyObject` with `x-amz-metadata-directive: REPLACE`, and a multipart copy sets the metadata on `CreateMultipartUpload`. diff --git a/core/services/s3/src/minio.md b/core/services/s3/src/minio.md index 7e658088c6..1944bc013b 100644 --- a/core/services/s3/src/minio.md +++ b/core/services/s3/src/minio.md @@ -16,6 +16,11 @@ not use AWS SSO, web identity, credential processes, ECS, EC2 metadata, or AssumeRole. Call [`MinioBuilder::skip_signature`] for a deployment that accepts anonymous requests. +## Conditional copy + +See [Destination conditions on copy](crate::S3#destination-conditions-on-copy) +for the affected MinIO Community Edition release and the operator override. + ## Write verification Pass a `WriteChecksum` intent to verify a non-append write. `Any` and `Fast`
