-
Notifications
You must be signed in to change notification settings - Fork 51
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
Client-Side Retry Ignores 'maxAttempts' Configuration #545
Comments
Yep, GAPICs do not implement the gRPC retry proposal, the goal was to align on that starting by using the config, but it was never finished in gRPC and we've since had to go in a different direction with the addition of another GAPIC transport. If you would like some functionality like We are unlikely to implement this at the moment. |
I'm going to close this for now. The feature is being investigated by the team more broadly and we may reopen this. Thanks! |
Could this be re-opened? It appears that grpc-go does implement max retries but that this code generator explicitly disables the service configuration and uses the |
It just disables remote resolution of the grpc service config (docs). If one was provided via WithDefaultServiceConfig, theoretically it would work. However, I believe the gRPC wrapper Google clients use are currently forcing a specific config so IDK if that would interfere.
Yes, but idk about Java, and I know C-core doesn't (it got deprioritized). So where possible, we'd prefer not to support things piecemeal language-wise, especially when there is no commitment to follow through on finishing it. My previous comment provides all of the context and a workaround. I will reopen this, but we cannot prioritize/work on it anytime soon and I can't tell you if it ever will be worked on. |
Thanks for re-opening
Agreed! The context here is that I am configuring the service json for Secret Manager and trying to come up with better default retry parameters, and the differences between the supported language generators is confusing for a service team to understand what the actual client behavior will be. |
Fair enough! Thanks for sharing, I understand the friction that comes with understanding implementations across languages. |
In the future we should close this issue and create a tracking bug internally for a cross lang feature request as this does not seem to relate just to Go. |
This should be reproducible on release v0.18.4.
The README mentions gRPC server config can be used for client-side retry configuration in accordance with AIP-4221. Most of the retry configuration is generated correctly, but the
maxAttempts
attribute is completely ignored.I verified the limit is ignored by adding a log statement to the
gax.APICall
function passed intogax.Invoke
to observe the retries continuing beyond the provided limit. The retries appeared to follow the policy backoff parameters, and the call option was otherwise generated correctly as shown below.Policy:
Generated call option:
Looking further into the gax package and specifically the Backoff struct, it doesn't look like there's any support for counting the number of attempts. The proposal here seems to indicate that an unavailable error should be returned after the max attempts are reached.
The text was updated successfully, but these errors were encountered: