Skip to content

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

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.

1 participant