Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: edit timeout and retry logic #1100

Merged
merged 3 commits into from
Sep 15, 2021
Merged

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 #902
Fixes #1013

@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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
2 participants