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

feat: add support for signed resumable upload URLs #290

Merged
merged 5 commits into from
Dec 23, 2021

Conversation

williambrode
Copy link
Contributor

@williambrode williambrode commented Dec 8, 2021

Fixes #289.

@williambrode williambrode requested review from a team as code owners December 8, 2021 21:53
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/google-resumable-media-python API. label Dec 8, 2021
@williambrode
Copy link
Contributor Author

I'm sure my code is not production-worthy yet but I wanted to create the PR to help show what the problem is from my debugging.

@williambrode
Copy link
Contributor Author

I signed the CLA.

@williambrode
Copy link
Contributor Author

This doesn't handle v2 signed urls because they use a different query param ("Signature" I believe). But I'm not sure that's a good reason to not support V4 signed urls. We can add this but I don't have a test for it.

@tseaver
Copy link
Contributor

tseaver commented Dec 9, 2021

@williambrode Thanks for the patch!

Can you double-check that the e-mail you used to create the commit (Author: <wil*****de​@activision.com>) matches the email(s) associated with your signed CLA?

@williambrode
Copy link
Contributor Author

@tseaver You are right my e-mail was wrong in the commit. I've fixed it.

Copy link
Contributor

@tseaver tseaver left a comment

Choose a reason for hiding this comment

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

This change looks reasonable, given the bug report, but we need to add unit tests to cover the new cases ("x-goog-signature" in parsed_query / ``"X-Goog-sSgnature" in parsed_query`).

@tseaver tseaver changed the title feat: add support for signed resumable upload url. Fixes #289. feat: add support for signed resumable upload URLs Dec 9, 2021
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 9, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 9, 2021
@unforced
Copy link
Contributor

@williambrode just wanted to follow up with you; are you able to write unit tests for this or would you like some support from us on that aspect. I know our testing framework might be a bit of a learning curve if this is your first external contribution :)

@williambrode
Copy link
Contributor Author

Ah, I didn't quite realize that was directed at me. I can take a look at adding the test.

@unforced
Copy link
Contributor

Haha, reading over Tres' message again, it might not have been, I think I was hasty in my pass-through.
We can definitely handle getting a unit test written unless you'd like to give that a shot.

@unforced
Copy link
Contributor

Alright, gave a go at the unit test. How's that look @tseaver ?

@cojenco cojenco added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 14, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 14, 2021
@cojenco cojenco added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 15, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 15, 2021
@cojenco cojenco added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 15, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 15, 2021
@cojenco
Copy link
Contributor

cojenco commented Dec 15, 2021

Updated the unit tests to cover signed url uploads. @tseaver PTAL, thanks!

@tseaver tseaver merged commit e1290f5 into googleapis:main Dec 23, 2021
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/google-resumable-media-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using a signed Resumable Upload URL fails with 403 unless content_type is empty
5 participants