Repository navigation
Conversation
Resume eligible buffer and file uploads from authoritative server progress, with configurable thresholds and temporary-file compression. Keep automatic uploads available without the manual protocol feature.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #700 +/- ##
==========================================
+ Coverage 91.90% 92.23% +0.33%
==========================================
Files 117 119 +2
Lines 24124 24436 +312
==========================================
+ Hits 22170 22539 +369
+ Misses 1954 1897 -57
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Separate payload preparation and reader lifetime from protocol recovery. Stop and join each request reader before returning its result, report local IO errors directly, and keep progress probes in a dedicated retry loop.
Unify direct fallbacks, make sizing optional, and limit resumables to standalone uploads.
# Conflicts: # Cargo.lock # clients/rust/src/error.rs Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Python Client
Rust Client
🤖 This preview updates automatically when you update the PR. |
…ated docs Co-Authored-By: Lorenzo Cian <17258265+lcian@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Entry
Session::putnow uses resumable uploads automatically for buffers and regular files of 256 MiB or more, and resends only what the server hasn't stored after a failed writeUsecase::with_resumable_threshold_bytesor per request with.resumable_threshold_bytes(...);Nonedisables automatic resumable uploads.ClientBuilder::spool_dirto choose where payloads compressed on the fly are spooled (defaults to the system temp dir).Error::UploadFailed.resumable-upload-apifeature only gates the manual resumable upload API. This new behavior is enabled regardless of that feature flag.Details
Session::putnow uses resumable uploads automatically for eligible uploads, matching the Python client (#667). An upload is eligible if:put,put_file,put_path)many()keep their existing batch or direct routing and ignore the threshold.Streams, generic readers, non-regular files and files of unknown size still use a direct upload.
The API and behavior mirrors the Python client:
File reader lifetime. reqwest can keep polling an HTTP/2 request body after it has returned a response. To avoid an old request reading from the file after a retry seeks, each file request gets its own reader task (
put/payload.rs). That task is stopped and joined before the next request starts.For reviewers
ErrorgainsUploadFailed, andResumableUploadUnavailable,UploadOffsetMismatchand the chunk-granularity variant are no longer feature-gated. SinceErroris#[non_exhaustive](feat(rs-client)!: Mark Error as non-exhaustive #706), this is additive.put.rs(routing),put/payload.rs(preparation and readers) andput/automatic.rs(recovery loop).via @lcian.
--
View Junior Session [Sentry]