Xuanwo opened a new pull request, #9086: URL: https://github.com/apache/opendal/pull/9086
# Which issue does this PR close? Related to #8134, which tracks native writer-copy compatibility across providers. # Rationale for this change Self-hosted Supabase Storage 1.99.1 deletes multipart uploads and responds with an empty HTTP 200. The S3 service expected HTTP 204, so `Writer::abort()` and `Copier::abort()` both reported `Unexpected` after the upload had been deleted. [Supabase Storage abort handler](https://github.com/supabase/storage/blob/96690aab27acc56c8cca894c81f4dc870bf75882/src/storage/protocols/s3/s3-handler.ts#L1048-L1070) ยท [AWS AbortMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) # What changes are included in this PR? Writer and Copier share the S3 `AbortMultipartUpload` request and response handling. The operation continues to accept HTTP 204. It also accepts HTTP 200 when the response body is empty. Nonempty HTTP 200 responses and other status codes go through the existing S3 error parser. Transport errors propagate to the caller. Tested on the official `supabase/storage-api:v1.99.1` image (`linux/amd64`, `sha256:8b5f385b5151fdf90da973ce35042229a198e733b67931aeca119314e39bd6fe`), PostgreSQL 17.10, and the local file backend through the `supabase` preset. Before the fix, the writer returned `Unexpected` when aborting after a ranged GET received 412 or an `UploadPartCopy` received 404. The copier returned the same error after successfully copying one part. After the fix, all three aborts succeeded. Each abort used the upload ID that held the part, the previous 10,485,772 destination bytes matched before and after the abort, and `ListMultipartUploads` returned zero active uploads. The regression test checks HTTP 204, empty HTTP 200, HTTP 200 with XML, HTML or whitespace, other statuses, and transport errors. # Are there any user-facing changes? `Writer::abort()` and `Copier::abort()` now succeed when an S3-compatible endpoint acknowledges multipart cleanup with an empty HTTP 200. Existing copy capabilities and source precondition handling are unchanged. # Breaking changes # AI Usage Statement - Harness: Pi coding agent in T3 Code - Model: `codex/gpt-6.2-sol` - Effort: `xhigh` - Role: Reproduced the false abort error on self-hosted Supabase, implemented the response handling, ran before-and-after verification, and drafted this pull request. The original fix was verified on the pinned local file backend. The follow-up test covers a custom transport that supplies a body alongside HTTP 204. - Pi, `magpie/agy-cli/gemini-4-neon`, high: independently reviewed the original fix and identified the HTTP 204 compatibility issue. - Pi, `magpie/codex/gpt-6.2-astra`, high: restored the previous HTTP 204 behavior and verified the regression test. -- 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]
