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

Merged
merged 1 commit into from May 28, 2019
Merged

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

merged 1 commit into from May 28, 2019

Conversation

@c-w
Copy link
Member

@c-w c-w 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
Copy link
Member Author

@c-w c-w commented May 17, 2019

Tagging @michaelperel since he last modified this code.

@codecov-io
Copy link

@codecov-io codecov-io 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
@Kami
Copy link
Member

@Kami Kami commented May 28, 2019

Merged, thanks.

asfgit pushed a commit that referenced this issue May 28, 2019
@c-w c-w deleted the 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants