Repository navigation
fix(interactions): retries = attempts - 1 - #3263
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
copybara/1013786410
branch
2 times, most recently
from
November 4, 2026 14:57
6c2d00f to
e7ebbe2
Compare
copybara-service
Bot
force-pushed
the
copybara/1013786410
branch
2 times, most recently
from
November 5, 2026 18:00
50bbcd7 to
e2546b0
Compare
copybara-service
Bot
force-pushed
the
copybara/1013786410
branch
from
November 5, 2026 19:01
e2546b0 to
5fcb8ab
Compare
`HttpRetryOptions.attempts` counts the original request, so 0 and 1 both mean no retries. `_translate_retry_config` previously passed `attempts` straight through as `RetryConfig.max_retries` (which counts retries after the initial request), causing `attempts=0` and `attempts=1` to still retry once. Map `attempts` to `max(attempts - 1, 0)`. When `attempts` is unset, Interactions now uses the same default as the rest of the SDK (`_api_client._RETRY_ATTEMPTS`, 5 attempts including the initial request) instead of its own constant (previously 4 attempts). Fixes #3260 PiperOrigin-RevId: 1014857114
copybara-service
Bot
force-pushed
the
copybara/1013786410
branch
from
November 5, 2026 19:21
5fcb8ab to
0f688a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(interactions): retries = attempts - 1
HttpRetryOptions.attemptscounts the original request, so 0 and 1 both mean no retries._translate_retry_configpreviously passedattemptsstraight through asRetryConfig.max_retries(which counts retries after the initial request), causingattempts=0andattempts=1to still retry once.Map
attemptstomax(attempts - 1, 0). Whenattemptsis unset, Interactions now uses the same default as the rest of the SDK (_api_client._RETRY_ATTEMPTS, 5 attempts including the initial request) instead of its own constant (previously 4 attempts).Fixes #3260