-
Notifications
You must be signed in to change notification settings - Fork 1.2k
gensupport: only retry storage media upload requests #538
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
Conversation
This modifies the changes in googleapis#528 by reverting the changes to SendRequest (which is widely used) and instead moving the new logic to a separate function, SendAndRetryRequest which will only be used on the initial request for media uploads. There is some code duplication from SendRequest now, which I can de-duplicate if folks think this is a good approach Fixes googleapis#2469
CL title should probably say something like "only retry media upload requests"? The method name is an internal detail (gensupport is internal). But if someone were to look through commit history, this would explain a change in behavior between versions (in addition to release notes of course) |
er, PR title :) |
@broady good point, thanks. :) |
Discussed this with @codyoss offline-- we do think it makes sense to limit scope to storage for right now until the effects have been more fully evaluated. It ended up being a simple change in gen.go to accomplish this (I verified by running the generation locally and confirming that only the one call I was targeting in storage-gen.go is now impacted once generation runs). |
This modifies the changes in #528 by reverting the changes
to SendRequest (which is widely used) and instead moving the
new logic to a separate function, SendAndRetryRequest which
will only be used on the initial request for media uploads.
There is some code duplication from SendRequest now, which I
can de-duplicate if folks think this is a good approach
Fixes googleapis/google-cloud-go#2469