Skip to content

fix(services/oss): honor if_not_exists on multipart uploads - #8041

Merged
Xuanwo merged 1 commit into
mainfrom
fix/oss-gcs-writer-if-not-exists
Aug 9, 2026
Merged

fix(services/oss): honor if_not_exists on multipart uploads#8041
Xuanwo merged 1 commit into
mainfrom
fix/oss-gcs-writer-if-not-exists

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Aug 9, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Related to #8040.

Rationale for this change

#8028 added behavior coverage for chunked writers with if_not_exists. That exposed two gaps on main:

  • OSS already supported single-shot write_with_if_not_exists, but multipart initiate/complete did not send x-oss-forbid-overwrite, so writer_with(...).if_not_exists(true) overwrote existing objects.
  • GCS XML API multipart uploads cannot use preconditions at all, so the same test cannot pass there.

What changes are included in this PR?

Are there any user-facing changes?

Yes. OSS multipart writers now honor if_not_exists instead of silently overwriting. No public API signature changes.

AI Usage Statement

Assisted by Cursor.

OSS requires x-oss-forbid-overwrite on both InitiateMultipartUpload and
CompleteMultipartUpload. Also skip the chunked-writer GCS coverage that
the XML multipart API cannot satisfy, tracked in #8040.
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. releases-note/fix The PR fixes a bug or has a title that begins with "fix" labels Aug 9, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 9, 2026
@Xuanwo
Xuanwo merged commit 744326f into main Aug 9, 2026
186 checks passed
@Xuanwo
Xuanwo deleted the fix/oss-gcs-writer-if-not-exists branch August 9, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/fix The PR fixes a bug or has a title that begins with "fix" size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants