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 streaming (on-disk) profile archives, which previously had no retry logic because the middleware cannot replay a consumed body stream. The fix introduces
Confidence Score: 5/5Safe to merge — the streaming retry loop correctly mirrors the middleware classifier and policy, and both new tests validate the expected attempt counts end-to-end. The core logic in No files require special attention. Important Files Changed
|
bee5a31 to
2298ed2
Compare
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.
2298ed2 to
32229fd
Compare
No description provided.