Skip to content

Retry interrupted streamed polling responses - #124

Open
agocharbhatia wants to merge 1 commit into
datalab-to:masterfrom
agocharbhatia:fix-streamed-poll-retries
Open

agocharbhatia wants to merge 1 commit into
datalab-to:masterfrom
agocharbhatia:fix-streamed-poll-retries

Conversation

@agocharbhatia

Copy link
Copy Markdown

Summary

With stream_response_to, a connection that drops while reading the result body raises a raw ClientPayloadError and skips the existing polling retries. Catch it at the response-read boundary so the SDK retries the GET without submitting the conversion again.

result body disconnects
  preserve HTTP status and Retry-After when present
  apply the existing GET retry policy

Evidence

  • Before: the local HTTP regression stops after one POST and one GET when the result body is cut short.
    After: one POST and two GETs produce the complete output.
  • The same final tests give six failures and four passes on the unchanged base; all ten pass with the patch. They cover truncated error bodies, the existing ten-attempt limit, cancellation, signed downloads and output-file cleanup.
  • Full SDK suite: 167 passed on Python 3.13. Ruff check and format checks pass.

This covers aiohttp.ClientError during body reads. It does not change timeout handling.

Merge Danger

Door: Two-way.

Blast Radius: Streamed polling.

Known error statuses retain their existing retry classification. Submission retries and public APIs are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant