Skip to content

Comments

[Storage] Added retry logic in Blob download's process_content for ServiceResponseError#45055

Merged
weirongw23-msft merged 2 commits intoAzure:mainfrom
weirongw23-msft:weirongw23/download-retries
Feb 11, 2026
Merged

[Storage] Added retry logic in Blob download's process_content for ServiceResponseError#45055
weirongw23-msft merged 2 commits intoAzure:mainfrom
weirongw23-msft:weirongw23/download-retries

Conversation

@weirongw23-msft
Copy link
Member

No description provided.

@weirongw23-msft weirongw23-msft marked this pull request as ready for review February 6, 2026 07:00
Copilot AI review requested due to automatic review settings February 6, 2026 07:00
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Feb 6, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds retry logic to handle ServiceResponseError exceptions during blob download operations in the Azure Storage Blob SDK. The change ensures that transient connection errors (such as connection resets) encountered during content processing are properly retried rather than immediately failing.

Changes:

  • Added ServiceResponseError to the exception handling in blob download process_content calls for both sync and async implementations
  • Added comprehensive test coverage for both sync and async scenarios that validates retry behavior for ServiceResponseError and ServiceResponseTimeoutError

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
sdk/storage/azure-storage-blob/azure/storage/blob/_download.py Added ServiceResponseError import and exception handling in two retry loops (_download_chunk and _initial_request methods)
sdk/storage/azure-storage-blob/azure/storage/blob/aio/_download_async.py Added ServiceResponseError import and exception handling in two retry loops (_download_chunk and _initial_request methods) - async version
sdk/storage/azure-storage-blob/tests/test_retry.py Added test case with ServiceResponseError and ServiceResponseTimeoutError imports and comprehensive test for retry behavior
sdk/storage/azure-storage-blob/tests/test_retry_async.py Added test case with ServiceResponseError and ServiceResponseTimeoutError imports and comprehensive test for retry behavior - async version

@weirongw23-msft weirongw23-msft merged commit 7e801a6 into Azure:main Feb 11, 2026
20 checks passed
@weirongw23-msft weirongw23-msft deleted the weirongw23/download-retries branch February 11, 2026 20:03
weirongw23-msft added a commit to weirongw23-msft/azure-sdk-for-python that referenced this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retries not working in azure.storage.blob response streaming when a ServiceResponseError occurs

2 participants