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

S3: Avoid a ListParts request in multipart upload #1041

Merged

Conversation

craigds
Copy link
Contributor

@craigds craigds commented Aug 12, 2021

S3 returns the ETag for each part of the upload while we're PUTting
them. However, until now we were ignoring those responses, and instead
doing a separate ListParts (GET) request for the upload object, just
before POSTing the list of parts to the completion endpoint to finalise
the upload.

That extra GET request is unnecessary so this commit removes it.

S3 returns the ETag for each part of the upload while we're PUTting
them. However, until now we were ignoring those responses, and instead
doing a separate ListParts (GET) request for the upload object, just
before POSTing the list of parts to the completion endpoint to finalise
the upload.

That extra GET request is unnecessary so this commit removes it.
@jschneier
Copy link
Owner

@craigds Thanks. I never set up hitting actual AWS during the tests so I must ask — how did you test this?

@craigds
Copy link
Contributor Author

craigds commented Sep 8, 2021

I tested it inside a dev container which was hitting s3, inserted a pdb breakpoint at the request and inspected the return value, and updated the mock to look similar.

Really the only thing that I had to verify is how the ETag for the uploaded part is included in the response (docs)

@jschneier
Copy link
Owner

Yep. Not saying it’s complicated, just want to hear how it was done (that it was done at all, really)

@jschneier jschneier merged commit 55a8000 into jschneier:master Sep 9, 2021
@craigds craigds deleted the s3-better-multipart-uploads branch September 12, 2021 02:31
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