chore: regenerate compute packages using gRPC service config#16751
chore: regenerate compute packages using gRPC service config#16751jskeet wants to merge 2 commits intogoogleapis:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request transitions the google-cloud-compute-v1beta package to a preview release level and implements standardized retry and timeout settings across service transports in both the v1 and v1beta libraries. Feedback was provided regarding the retry configuration, noting that setting the total retry deadline equal to the per-attempt default_timeout (both at 600 seconds) renders retries on DeadlineExceeded ineffective, as the total deadline is reached simultaneously with the first timeout.
| default_retry=retries.Retry( | ||
| initial=0.1, | ||
| maximum=60.0, | ||
| multiplier=1.3, | ||
| predicate=retries.if_exception_type( | ||
| core_exceptions.DeadlineExceeded, | ||
| core_exceptions.ServiceUnavailable, | ||
| ), | ||
| deadline=600.0, | ||
| ), | ||
| default_timeout=600.0, |
There was a problem hiding this comment.
The default_retry configuration includes core_exceptions.DeadlineExceeded in its predicate, but the deadline (total timeout) is set to 600.0, which is identical to the default_timeout (per-attempt timeout). This configuration effectively prevents retries on timeouts because the first attempt that hits the 600s limit will also reach the total retry deadline. To make retrying on DeadlineExceeded effective, the deadline should be greater than the default_timeout, or the default_timeout should be reduced.
This is a draft, not intended to be submitted, to a) test that presubmits pass; b) allow for discussion.
This is the result of locally applying a fix for googleapis/librarian#3827 and regenerating the two packages. (That fix does not yet have a librarian PR - we'll see if this causes issues first.)