rleungx opened a new pull request, #903: URL: https://github.com/apache/arrow-rs-object-store/pull/903
# Which issue does this PR close? Closes #416. # Rationale for this change Alibaba OSS uses `x-oss-forbid-overwrite` for conditional creation instead of the standard S3 precondition headers. The existing `S3ConditionalPut` configuration cannot express this behavior. # What changes are included in this PR? Add `S3ConditionalPut::Header` and `HeaderWithStatus`, following the configuration syntax used by `S3CopyIfNotExists`. Conditional creates send the configured header and map the configured rejection status to `AlreadyExists`. Custom-header configurations reject `PutMode::Update`. Add parsing and mock HTTP regression tests covering request headers, response metadata, duplicate creation, unrelated errors, overwrite, unsupported updates, and standard ETag behavior. Update the integration helper to distinguish create-only support from conditional-update support. # Are there any user-facing changes? OSS users can opt in with: ```shell AWS_CONDITIONAL_PUT='header-with-status: x-oss-forbid-overwrite: true: 409' ``` OSS ignores this header when bucket versioning is enabled or suspended. This configuration requires a bucket that has never enabled versioning. The default remains `S3ConditionalPut::ETagMatch`. # Validation - AWS-feature unit and file tests: 197 unit tests and 3 file tests passed; 2 unit tests ignored. Cloud integration tests were disabled. - All-feature doctests: 57 passed, 2 ignored. - All-feature/all-target Clippy with warnings denied, rustdoc with warnings denied, formatting, and diff whitespace checks passed. The AWS-only doctest run has one existing failure: `SpawnedReqwestConnector` imports Azure without enabling the Azure feature. It passes with all features. No live OSS integration test was run. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
