Skip to content

feat(core): add conflict error kind - #8154

Merged
Xuanwo merged 7 commits into
mainfrom
xuanwo/implement-conflict-error
Aug 26, 2026
Merged

feat(core): add conflict error kind#8154
Xuanwo merged 7 commits into
mainfrom
xuanwo/implement-conflict-error

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Aug 26, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Implements RFC #8145.

Rationale for this change

ConditionNotMatch currently combines failed OpenDAL conditions with provider-side resource-state conflicts. Those outcomes require different recovery, and retryability depends on the operation that received the error rather than the error kind alone.

What changes are included in this PR?

  • Add ErrorKind::Conflict and narrow the public ConditionNotMatch and retry contracts.
  • Classify S3, GCS, and Azure Blob errors by native error code and operation context before falling back to HTTP status.
  • Keep S3 PutObject conditional conflicts temporary while leaving multipart completion conflicts permanent because recovery requires a new upload session.
  • Translate Azure no-replace errors according to if_not_exists and internal state-transition context.
  • Expose Conflict from the C, Go, Java, Python, .NET, Haskell, and Zig bindings without renumbering existing error values.
  • Add focused parser and binding regression coverage.

Are there any user-facing changes?

Yes. Provider-side operation conflicts that were previously reported as ConditionNotMatch now use Conflict. Existing OpenDAL conditions still use ConditionNotMatch, and unconditional create-style collisions continue to use AlreadyExists where applicable. Retry status remains independent from the error kind.

AI Usage Statement

AI materially assisted with implementation and test drafting. I reviewed the changes and verified them against the accepted RFC and current provider documentation. The provider mappings were not reproduced against live S3, GCS, or Azure Blob accounts. The Zig source was format-checked, but the local Zig build test was blocked by host macOS linker errors; the generated C API and Rust binding crates compile.

@Xuanwo
Xuanwo marked this pull request as ready for review August 26, 2026 08:55
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Aug 26, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 26, 2026
@Xuanwo
Xuanwo merged commit c27eee2 into main Aug 26, 2026
78 of 79 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/implement-conflict-error branch August 26, 2026 09:42
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/feat The PR implements a new feature or has a title that begins with "feat" size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants