Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIBCLOUD-1043] Fix Azure upload_object_via_stream used with iter #1287

Conversation

Projects
None yet
3 participants
@c-w
Copy link
Member

commented May 17, 2019

Fix Azure upload_object_via_stream used with iter

Description

As described in LIBCLOUD-1043, the Azure Blob Storage driver currently doesn't support use-cases like this:

driver.upload_object_via_stream(iter(something), ...)

This is due to the fact that the current implementation of upload_object_via_stream assumes that the passed-in iterator always implements seek. This pull request adds a fallback for iterators where this is not the case.

Status

  • done, ready for review

Checklist (tick everything that applies)

  • Code linting
  • Documentation Bugfix only
  • Tests Added new unit test
  • ICLA (required for bigger changes) Code change is small

@c-w c-w force-pushed the CatalystCode:1043_fix_azure_upload_object_via_stream_with_iterator branch 3 times, most recently from 4658100 to 1e52deb May 17, 2019

@c-w

This comment has been minimized.

Copy link
Member Author

commented May 17, 2019

Tagging @michaelperel since he last modified this code.

@c-w c-w force-pushed the CatalystCode:1043_fix_azure_upload_object_via_stream_with_iterator branch from 1e52deb to d949d76 May 27, 2019

@codecov-io

This comment has been minimized.

Copy link

commented May 27, 2019

Codecov Report

Merging #1287 into trunk will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##            trunk    #1287      +/-   ##
==========================================
+ Coverage   85.98%   85.98%   +<.01%     
==========================================
  Files         359      359              
  Lines       73809    73824      +15     
  Branches     6698     6698              
==========================================
+ Hits        63466    63481      +15     
  Misses       7666     7666              
  Partials     2677     2677
Impacted Files Coverage Δ
libcloud/test/storage/test_azure_blobs.py 92.08% <100%> (+0.15%) ⬆️
libcloud/storage/drivers/azure_blobs.py 68.43% <100%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 064ad6c...d949d76. Read the comment docs.

@Kami

Kami approved these changes May 28, 2019

@Kami Kami merged commit f086aa6 into apache:trunk May 28, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Kami

This comment has been minimized.

Copy link
Member

commented May 28, 2019

Merged, thanks.

asfgit pushed a commit that referenced this pull request May 28, 2019

@c-w c-w deleted the CatalystCode:1043_fix_azure_upload_object_via_stream_with_iterator branch May 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.