fix: add upload retry#399
Conversation
Merging this PR will not alter performance
|
df83123 to
bee5a31
Compare
Greptile SummaryThis PR adds upload retry support for the disk-backed (WallTime/Memory) streaming path, which previously sent exactly one attempt because the
Confidence Score: 4/5The change is safe to merge. The core retry logic is correct and directly mirrors how the existing middleware-backed path works; integration tests confirm both paths retry the expected number of times. The retry loop correctly rebuilds the stream on each attempt, and the backoff policy and transient classification are shared with the proven middleware path. The two notes — a misleading doc comment in a test and the absence of a clarifying comment about non-success responses being returned as Ok — are cosmetic and do not affect runtime behavior. No files require special attention, though the doc comment on Important Files Changed
|
Streamed (on-disk) uploads went through STREAMING_CLIENT, which has no retry middleware because a consumed stream body can't be replayed. Add a manual retry loop that rebuilds the stream from disk on each attempt and reuses reqwest_retry's backoff policy and transient classifier, matching the in-memory path's behavior. Extract the shared backoff into request_client::upload_backoff() so both the retry middleware and the streamed loop use one policy; under cfg(test) its intervals shrink to milliseconds to keep the retry tests fast. Add tests asserting both the streamed and in-memory paths retry transient 503s 1 + UPLOAD_RETRY_COUNT times.
bee5a31 to
2298ed2
Compare
No description provided.