Exponential backoff can't be enabled for clients with credentials #2512
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: docs
Improvement to the documentation for an API.
Hello,
I've got a service which recently ran into issues. One of the AIs from the postmortem is that we should make sure that API client users use exponential backoff by default.
Currently, in order to enable exponential backoff you need to explicitly configure the HttpRequestInitializer object when creating the client interface. For example (from one of my tests):
Except, in real life you're passing a GoogleAccountCredential object as the HttpRequestInitializer. This sets its own unsuccessful response handler (set in
google-api-java-client/google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential.java
Line 152 in dd33337
This all seems extremely wrong. I don't see a way in which a client can use a credential and configure exponential backoff, let alone by default. Our examples (e.g. https://developers.google.com/api-client-library/java) don't include any form of exponential backoff; I had to debug my way through the client code to find out it was supported at all.
Am I missing anything here?
The text was updated successfully, but these errors were encountered: