chore(storage): declare request_cancellation as implemented - #1330
Conversation
Storage rides the same URLSession and retry interceptor path as database and functions, so cancelling the enclosing Task tears down an in-flight upload or download. The matrix marked it not_implemented while the other two modules were declared implemented for the same mechanism.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe compliance manifest now marks Priority: ⬇️ Low Change: Other Merge Risk: ⚪ Minimal · up to The manifest-only capability status update has no identified merge-blocking risk. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 34602536649Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-0.2%) to 87.418%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions20 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
|
The following capabilities are marked
The following capabilities are marked
These may have been renamed, removed, or never registered. Please update the capability matrix. |
Summary
`storage.file_buckets.request_cancellation` was marked `not_implemented` while `database.using_modifiers.request_cancellation` and `functions.invocation.request_cancellation` are declared `implemented` for the same mechanism: cancellation is plain Swift structured concurrency, there is no dedicated symbol to register.
Storage goes through the same path. `StorageHTTPSession` wraps the async `URLSession` data and upload calls, which honor Task cancellation, and the shared `RetryRequestInterceptor` checks `Task.isCancelled` after its backoff sleep. This flips the storage entry to `implemented` with the same note the other two modules carry.
Verification
A scratch executable pointed `SupabaseStorageClient` at a non-routable address with a 120 second URLSession timeout, started an `upload` and a `download` in their own Tasks, and cancelled both after 300 ms. Each threw `NSURLErrorDomain -999 "cancelled"` at roughly 320 ms instead of waiting out the timeout.
No test is added here. SDK-1640 tracks adding a mid-request and mid-backoff cancellation test for the shared transport, which covers storage as well.