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: Determine Content-Length Before Attempting Multi-chunk Upload #2074

Merged
merged 12 commits into from Sep 23, 2022

Conversation

danielbankhead
Copy link
Member

Fixes #2073 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/nodejs-storage API. labels Sep 21, 2022
@danielbankhead danielbankhead changed the title test: Add system-tests for resumable multi-chunk uploads fix: Determine Content-Length Before Attempting Multi-chunk Upload Sep 21, 2022
@danielbankhead danielbankhead marked this pull request as ready for review September 22, 2022 03:22
@danielbankhead danielbankhead requested review from a team as code owners September 22, 2022 03:22
@danielbankhead danielbankhead added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 22, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 22, 2022
src/resumable-upload.ts Show resolved Hide resolved
Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

Discussed the implementation in detail with @danielbankhead.

The PR LGTM, it introduces not only unit tests but also system tests which validate critical multi chunk use cases which were not being tested before against the live service.

Complexity of resumable media API with streams caused the following use cases to not be captured: aa80374
The tests that failed in this commit now pass as expected.

@danielbankhead danielbankhead merged commit 666402a into main Sep 23, 2022
@danielbankhead danielbankhead deleted the fix-divisible-chunk-size branch September 23, 2022 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-chunk Upload Without contentLength Can Hang When fileSize % chunkSize != 0
2 participants