acoustic-carpenter-78188
12/11/2025, 11:32 PMsrc/flyte/remote/_data.py module. The main improvement is the addition of an exponential backoff strategy for handling transient network and server errors during file uploads, replacing the previous single-attempt upload logic. This enhances reliability, especially in unstable network conditions.
Resilience improvements for file uploads:
• Added a new _upload_with_retry async function that uploads files using exponential backoff and retries on transient network errors and retryable HTTP status codes (408, 429, 500, 502, 503, 504). This function logs retries and raises a RuntimeSystemError if all attempts fail.
• Introduced a custom _RetryableUploadError exception and a helper function _is_retryable_status_code to distinguish between retryable and non-retryable HTTP errors.
Integration with file upload flow:
• Updated the _upload_single_file function to use _upload_with_retry instead of directly uploading the file in a single attempt, ensuring all uploads benefit from the new retry logic.
• Refactored header preparation and removed redundant file open/close logic in _upload_single_file, delegating the upload responsibility to the new retry-enabled function.
flyteorg/flyte-sdkacoustic-carpenter-78188
12/12/2025, 11:14 PM