feat(emulator): adds resumable upload API support for multiple chunk and cancelling#10325
Open
jakeisonline wants to merge 6 commits intofirebase:mainfrom
Open
feat(emulator): adds resumable upload API support for multiple chunk and cancelling#10325jakeisonline wants to merge 6 commits intofirebase:mainfrom
jakeisonline wants to merge 6 commits intofirebase:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request enhances the storage emulator's resumable upload API by adding support for multiple chunk uploads and upload cancellation. The changes include a more robust handling of the Content-Range header, status check requests, and the implementation of a DELETE endpoint for cancelling active uploads. Feedback focuses on optimizing redundant header parsing, correcting an offset calculation in an error message, and expanding the Content-Range regex to support all valid Cloud Storage formats.
…ients finalizing upload of unknown size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a follow up to #9047 which was unfortunately reverted in #9107 due to issues in failing integration tests. While it wasn't revealed what the specific issue were, I'm hoping this new approach might avoid those same issues. Given the complexity of resumable uploads, I figured this was an important piece of coverage for the emulator to have.
This PR pays particular attention to the validation of the
Content-Rangeheader sent by the client, in addition to ensuring the status codes and response bodies (and therefore the underlying logic) coming from the emulator match live GCS as much as possible.Approach
Content-Range, non-existent upload IDs, etc).Scenarios Tested