Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

fix: edit timeout and retry logic#1100

Merged
alicejli merged 3 commits intogoogleapis:mainfrom
alicejli:timeout
Sep 15, 2021
Merged

fix: edit timeout and retry logic#1100
alicejli merged 3 commits intogoogleapis:mainfrom
alicejli:timeout

Conversation

@alicejli
Copy link
Contributor

@alicejli alicejli commented Sep 3, 2021

This updates gax retry/timeout logic such that:

a) If a service defines a method-specific timeout_millis in their service_grpc_config.json file, that value will override and be used as the totalTimeoutMillis, initialRpcTimeoutMillis, and maxRpcTimeoutMillis value. This is similar to how Java/PHP microgenerators handle timeouts.

b) If a user defines a timeout value, then that value will override and be used as the totalTimeoutMillis, initialRpcTimeoutMillis, and maxRpcTimeoutMillis value (note that a user-defined timeout will supercede a service-defined timeout).

Fixes googleapis/google-cloud-node-core#390
Fixes googleapis/google-cloud-node-core#370

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 3, 2021
@alicejli alicejli changed the title fix: editing retry logic fix: edit timeout and retry logic Sep 3, 2021
@alicejli alicejli added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 14, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 14, 2021
@alicejli alicejli marked this pull request as ready for review September 14, 2021 23:25
@alicejli alicejli requested a review from a team as a code owner September 14, 2021 23:25
Copy link
Contributor

@summer-ji-eng summer-ji-eng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

retry !== null &&
retry.retryCodes.length > 0
) {
retry.backoffSettings.initialRpcTimeoutMillis = timeout;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you confirm from the design doc. If a user provide timeout and retry.backoffSetting, we are repect the retry setting.

@alicejli alicejli merged commit 05548d5 into googleapis:main Sep 15, 2021
feywind added a commit to feywind/nodejs-pubsub that referenced this pull request Nov 18, 2021
feywind added a commit to googleapis/nodejs-pubsub that referenced this pull request Nov 18, 2021
summer-ji-eng pushed a commit to stephenplusplus/gax-nodejs that referenced this pull request Jan 5, 2022
…is#1024)

* build: add auto-approve to Node libraries

Co-authored-by: Benjamin E. Coe <bencoe@google.com>
Source-Link: googleapis/synthtool@5cae043
Post-Processor: gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:65aa68f2242c172345d7c1e780bced839bfdc344955d6aa460aa63b4481d93e5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timeout_millis is ignored if retry settings are provided Confusing behavior when trying to set deadlines on a gRPC call

2 participants