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

Fix streaming upload #670

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rikonen
Copy link

@rikonen rikonen commented Jun 25, 2020

Uploading blob that was read from source like pipe was not working correctly due to couple of bugs.

rikonen added 2 commits June 25, 2020 12:05
Source stream may return less data than what was requested and in case
size of the entire blob was not known this was not taken into account
when reading more data, sometimes resulting in all data being read from
the stream and sent in one chunk, which could end up being larger than
the maximum supported size.
_BlobChunkUploader called tell() on the source stream even though it did
not use the result for anything. If the stream was non-seekable this
just made the operation fail completely unnecessarily.
@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2020

Codecov Report

Merging #670 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #670   +/-   ##
=======================================
  Coverage   86.98%   86.99%           
=======================================
  Files          52       52           
  Lines        5288     5289    +1     
  Branches      566      567    +1     
=======================================
+ Hits         4600     4601    +1     
  Misses        515      515           
  Partials      173      173           
Impacted Files Coverage Δ
...torage-blob/azure/storage/blob/_upload_chunking.py 71.96% <100.00%> (+0.10%) ⬆️

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 9cbce66...8ee7dd5. Read the comment docs.

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.

2 participants