Xuanwo opened a new pull request, #8954:
URL: https://github.com/apache/opendal/pull/8954

   # Which issue does this PR close?
   
   None.
   
   # Rationale for this change
   
   - `.github/workflows/ci_bindings_c.yml` currently runs `cargo clippy -- -D 
warnings` without `--all-targets` and never runs `cargo test`, leaving the Rust 
unit tests in `bindings/c/src/` (including those added in #8949) uncompiled and 
unexecuted in CI.
   - Now that #8950 (`RetryWrapper` cancellation safety) is merged, 
`bindings/c` should guard mid-flight cancellation recovery for 
`opendal_deleter_flush_with_cancel` and `opendal_copier_abort_with_cancel` on 
operators with the default `RetryLayer` stack, and clarify cancellation 
recovery guidance in the C API docs.
   
   # What changes are included in this PR?
   
   - Update `.github/workflows/ci_bindings_c.yml` to run `cargo clippy 
--all-targets -- -D warnings` and `cargo test` in `bindings/c`.
   - Add deterministic Rust unit tests in `bindings/c/src/cancel.rs` verifying 
that mid-flight cancellation of `opendal_deleter_flush_with_cancel` and 
`opendal_copier_abort_with_cancel` on a `RetryLayer` + `LoggingLayer` operator 
(matching `opendal_operator_new`) does not poison the handle and allows 
subsequent flush/abort calls to succeed.
   - Clarify cancellation recovery guidance in `bindings/c/src/copier.rs` 
(`opendal_copier_abort_with_cancel` may be retried with a fresh cancel token or 
`NULL`) and `bindings/c/src/writer.rs` (`opendal_writer_write_with_cancel` / 
`opendal_writer_close_with_cancel` callers should free the handle and start a 
new writer after mid-flight cancellation), and regenerate 
`bindings/c/include/opendal.h`.
   
   # Are there any user-facing changes?
   
   Documentation updates in `bindings/c/include/opendal.h` (and Rust doc 
comments in `bindings/c/src/copier.rs` and `bindings/c/src/writer.rs`) 
clarifying cancellation recovery behavior for 
`opendal_copier_abort_with_cancel`, `opendal_writer_write_with_cancel`, and 
`opendal_writer_close_with_cancel`. No ABI or runtime behavior changes.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: pi
   - Model: Gemini 4 Neon
   - Effort: high
   - Role: Authored the workflow update, Rust unit tests for `RetryLayer` 
cancellation recovery, doc comment updates, regenerated 
`bindings/c/include/opendal.h`, and ran local formatting, lint, test, and 
C11/C++14 header checks. `zizmor` was not installed locally, so workflow 
security linting relies on repository CI.
   


-- 
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]

Reply via email to