Skip to content

[Azure Blobs] Forward chunk_size in download_object_as_stream#2169

Merged
micafer merged 1 commit into
apache:trunkfrom
Sanjays2402:fix/1698-azure-chunk-size
Jul 24, 2026
Merged

[Azure Blobs] Forward chunk_size in download_object_as_stream#2169
micafer merged 1 commit into
apache:trunkfrom
Sanjays2402:fix/1698-azure-chunk-size

Conversation

@Sanjays2402

Copy link
Copy Markdown
Contributor

[Azure Blobs] Forward chunk_size in download_object_as_stream

Description

Closes #1698. download_object_as_stream and download_object_range_as_stream in the Azure Blobs driver passed the hardcoded AZURE_DOWNLOAD_CHUNK_SIZE to iter_content instead of the caller's chunk_size, so a requested size was silently ignored. Both now forward chunk_size (falling back to the default when None), matching the S3 driver's behavior.

Status

  • done, ready for review

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)

download_object_as_stream and download_object_range_as_stream passed the
hardcoded AZURE_DOWNLOAD_CHUNK_SIZE to iter_content instead of the
caller's chunk_size, so a requested size was silently ignored. Forward
chunk_size (falling back to the default when None), matching the S3
driver. Adds a regression test covering both methods.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.39%. Comparing base (fe948d0) to head (5385be3).

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #2169   +/-   ##
=======================================
  Coverage   83.39%   83.39%           
=======================================
  Files         351      351           
  Lines       81504    81519   +15     
  Branches     8747     8747           
=======================================
+ Hits        67967    67982   +15     
  Misses      10744    10744           
  Partials     2793     2793           
Files with missing lines Coverage Δ
libcloud/storage/drivers/azure_blobs.py 86.78% <100.00%> (ø)
libcloud/test/storage/test_azure_blobs.py 94.69% <100.00%> (+0.14%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@micafer micafer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@micafer
micafer merged commit b646588 into apache:trunk Jul 24, 2026
17 checks passed
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.

download_object_as_stream for Azure (azure_blobs.py) silently ignores caller's chunk_size without raising an exception.

3 participants