gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

GoogleAdsService doesn't properly apply retries when Retry is passed in

Open Kache opened this issue 3 years ago • 0 comments

Original report: https://github.com/googleads/google-ads-python/issues/597 Directed to this project by @BenRKarl

Excerpt:

GoogleAdsService provides search(), which accepts a retry: google.api_core.retry.Retry. The Retry decorator ends up only getting applied on the first request, making it effectively useless for large results with many pages.

Subsequent requests are issued by SearchPager, initialized a few lines down, where retry is not passed in, thus making it unavailable at evocation, where every SearchPager._method() call is not retry-decorated.

See original report (above) for environment details, steps to reproduce, some context background, followup questions, etc.

~~I'd also opened fix PR https://github.com/googleads/google-ads-python/pull/598, but I'm told it's code generated from this library.~~ I've opened https://github.com/googleapis/gapic-generator-python/pull/1245 that fixes Retry() for search().

Kache avatar Mar 18 '22 16:03 Kache