fix: add upload retry#399
Conversation
Merging this PR will not alter performance
|
df83123 to
bee5a31
Compare
Greptile SummaryAdds upload retry for on-disk (streaming) profile archives. Previously
Confidence Score: 5/5Safe to merge. The production retry logic is correct, response-level errors are handled by the existing caller check, and both new tests pass through realistic code paths. The production retry logic is correct — send_streamed_with_retry correctly rebuilds the stream body, classifies transient errors via DefaultRetryableStrategy, and gates retries through ExponentialBackoff. The only finding is a test-infrastructure concern that does not affect production behaviour. No files require special attention. 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.