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

feat(core): add timeout param to JSONConnection.api_request() #9915

Merged
merged 1 commit into from
Dec 4, 2019

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Dec 4, 2019

Fixes #9914.
Towards #7831.

As discussed on a related PR, a "clients gets stuck" fix needs a timeout in the transport layer where the blockage randomly occurs occasionally.

Keeping the existing default behavior the same for now (timeout=None), but if there is a "good" default timeout value that suits all client libraries, we can make the requests timeout by default to avoid randomly blocking indefinitely.

PR checklist

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@plamut plamut requested a review from tswast December 4, 2019 15:00
@plamut plamut requested a review from busunkim96 as a code owner December 4, 2019 15:00
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 4, 2019
@tswast
Copy link
Contributor

tswast commented Dec 4, 2019

I think this should be a pretty uncontroversial change, especially since it only affects a few handwritten clients, so I'm going to merge it.

@tswast tswast merged commit 7bd36bd into googleapis:master Dec 4, 2019
@plamut plamut deleted the add-conn-timeout branch December 4, 2019 21:39
@crwilcox
Copy link
Contributor

This has broken the tests for Google Cloud Storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Core: Add timeout parameter to connection's api_request() method
4 participants