<#896 Fix code bundle upload hanging indefinitely ...
# flyte-github
a
#896 Fix code bundle upload hanging indefinitely on network issues Pull request opened by pingsutw Summary • Add 10-minute timeout (600s read, 30s connect) to the
httpx.AsyncClient
used for uploading code bundles to object storage. Previously no timeout was configured, causing
flyte run
to hang forever at "Uploading code bundle..." when the network connection was blocked or dropped. • Catch
httpx.TimeoutException
,
httpx.ConnectError
, and
OSError
in the retry loop so transport-level errors are retried with backoff (previously only HTTP status codes were retried). • Fix
last_error
tracking that was always
None
in retry warning logs. Context Reported by a customer whose
flyte run
hung indefinitely at "Uploading code bundle..." from remote EC2 instances. The control plane connection worked fine, but the signed URL upload to object storage was silently blocked by network configuration. Without a timeout, the SDK gave no error — it just hung forever. Slack thread: https://unionai.slack.com/archives/C05H8K48HPE/p1774990000333939 Test plan •
pytest tests/flyte/remote/test_upload_retry.py
— 6 new tests covering timeout config, retry on timeout/connect errors, retry on 5xx then success, and no retry on 4xx •
pytest tests/flyte/remote/test_data_errors.py
— existing upload error tests still pass flyteorg/flyte-sdk