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

Allow configuring HTTP connect timeout #46102

Merged
merged 1 commit into from Feb 26, 2018
Merged

Conversation

@mephi42
Copy link
Contributor

@mephi42 mephi42 commented Feb 19, 2018

What does this PR do?

Allows configuring HTTP connection timeout for Tornado back-end.

What issues does this PR fix or reference?

None

Previous Behavior

HTTP connection timeout was always Tornado's default of 20 seconds.

New Behavior

If not explicitly configured, HTTP connection timeout remains 20 seconds. Otherwise user-specified value is used.

Tests written?

No

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@mephi42 mephi42 requested a review from as a code owner Feb 19, 2018
Copy link
Contributor

@DmitryKuzmenko DmitryKuzmenko left a comment

LGTM

Copy link
Contributor

@rallytime rallytime left a comment

I have one small request, and then I would also love to see docs added to the config docs.

@@ -532,6 +533,7 @@ def query(url,
allow_nonstandard_methods=True,
streaming_callback=streaming_callback,
header_callback=header_callback,
connect_timeout=connect_timeout,
Copy link
Contributor

@rallytime rallytime Feb 23, 2018

Can you move this to the bottom of the kwargs list? We don't want to cause an API change for people or other Salt functions using query who might be calling this with args/kwargs in a certain order.

Copy link
Contributor Author

@mephi42 mephi42 Feb 23, 2018

This is the call to fetch() - http://www.tornadoweb.org/en/stable/httpclient.html#tornado.httpclient.HTTPRequest (you need to expand the minimized lines to see this, otherwise this looks like query() parameter list), and there connect_timeout comes before request_timeout.

Copy link
Contributor

@rallytime rallytime Feb 24, 2018

Oh! You're right. My apologies.

@mephi42
Copy link
Contributor Author

@mephi42 mephi42 commented Feb 23, 2018

Added the docs for the new parameter and also for the existing http_request_timeout. I wasn't sure into which section to put them, so I created a new one.

Copy link
Contributor

@rallytime rallytime left a comment

I like the new section in the docs - That looks good! I think adding this to the minion config docs would also be good.

``http_connect_timeout``
------------------------

.. versionadded:: 2018.3.0
Copy link
Contributor

@rallytime rallytime Feb 24, 2018

This should be Fluorine for the develop branch.

Copy link
Contributor Author

@mephi42 mephi42 Feb 24, 2018

Done

@mephi42
Copy link
Contributor Author

@mephi42 mephi42 commented Feb 24, 2018

In minion docs the related proxy_* are in "Minion Primary Configuration", so I put the new items there as well. For that reason I also moved them to "Primary Master Configuration" in master docs.

@rallytime rallytime merged commit f9408ce into saltstack:develop Feb 26, 2018
3 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants