googleapis / googleapis/google-cloud-php
Auth retry handler cannot be overridden and default retry handler does not handle CURL exceptions (code 0) well.
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 463
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 145
Description
Please allow the overriding of auth retry method and the type of codes/messages the default retry decider will retry on.
Fetching Auth tokens does not allow you to override the default retry functionality.
https://github.com/googleapis/google-cloud-php/blob/master/Core/src/RequestWrapper.php#L318
The default retry function does not handle CURL exception well which come back as 0 error code and cannot be overridden because the method and property are both labeled as private.
https://github.com/googleapis/google-cloud-php/blob/master/Core/src/RetryDeciderTrait.php#L99
For some background info, we did not have auth token caching enabled for our CLI processes and a blip in the SSL transit at oauth2 kicked up a bunch of untried exceptions which resulted in some toil for us. We are adding the auth token caching for our CLI as well as some retry logic in app. However the current design of the classes below had already driven us to implement other work around for the curl exception code of 0. This hasd largely been due to some carrier transit issues on our side but I think making these small changes would be a solid win. Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.