Xuanwo opened a new pull request, #8899: URL: https://github.com/apache/opendal/pull/8899
# Which issue does this PR close? Part of #8851. Part of #8850. # Rationale for this change `IntoMultipartCopyContext` existed only so unit tests could omit `Capability::default()`; both production callers (`s3` and `tos`) already pass `(ctx.executor().clone(), capability)`. Taking `executor: Executor` and `capability: Capability` directly in `oio::MultipartCopier::new` removes the single-purpose conversion trait and makes the constructor signature explicit. In `CompleteLayer`, `CompleteService::stat` unwrapped `RpStat` into `Metadata` only to re-wrap it in `RpStat::new`, and `CompleteLayer` still kept a private `layer()` trampoline plus unnecessary `pub` visibility on internal wrapper types inside the private `complete` module. # What changes are included in this PR? - Remove `raw::oio::IntoMultipartCopyContext` and change `raw::oio::MultipartCopier::new` to accept `executor: Executor` and `capability: Capability` as explicit parameters (`core/core/src/raw/oio/copy/multipart_copy.rs`). - Update `S3` and `TOS` copier constructors (`core/services/s3/src/copier.rs`, `core/services/tos/src/copier.rs`) and `MultipartCopier` unit tests to pass `executor` and `capability` directly. - Document the raw API signature change in `core/core/src/docs/upgrade.md`. - Simplify `CompleteService::stat` to forward `self.inner.stat(ctx, path, args).await` directly (`core/core/src/layers/complete.rs`). - Inline `CompleteService` construction in `CompleteLayer::apply_service`, remove the private `CompleteLayer::layer` trampoline, and make internal `Complete*` wrapper structs private (`core/core/src/layers/complete.rs`). # Are there any user-facing changes? Yes, in the raw API: `raw::oio::IntoMultipartCopyContext` is removed and `raw::oio::MultipartCopier::new` takes `executor: Executor` and `capability: Capability` explicitly instead of `impl IntoMultipartCopyContext`. There are no changes to the high-level `Operator` API. # Breaking changes Affected packages: core Migration: - Remove uses of `raw::oio::IntoMultipartCopyContext` and pass `executor` and `capability` directly to `raw::oio::MultipartCopier::new(executor, capability, inner, source_content_length_hint, copy_once_threshold, part_size, concurrent)`. # AI Usage Statement - Harness: pi - Model: Gemini 4 Neon - Effort: High - Role: Audited issues #8851 and #8850 against `main`, removed `IntoMultipartCopyContext`, updated `S3`/`TOS` callers and `upgrade.md`, simplified `CompleteLayer` and `CompleteService::stat`, and verified formatting, clippy, rustdoc, and unit/doc tests locally. -- 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]
