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

Conversation

Projects
None yet
3 participants
@mephi42
Copy link
Contributor

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 saltstack/team-core as a code owner Feb 19, 2018

@DmitryKuzmenko
Copy link
Contributor

left a comment

LGTM

@rallytime
Copy link
Contributor

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,

This comment has been minimized.

Copy link
@rallytime

rallytime Feb 23, 2018

Contributor

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.

This comment has been minimized.

Copy link
@mephi42

mephi42 Feb 23, 2018

Author Contributor

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.

This comment has been minimized.

Copy link
@rallytime

rallytime Feb 24, 2018

Contributor

Oh! You're right. My apologies.

@mephi42 mephi42 force-pushed the mephi42:develop branch from 78acb58 to 5cce8d7 Feb 23, 2018

@mephi42

This comment has been minimized.

Copy link
Contributor Author

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.

@rallytime
Copy link
Contributor

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

This comment has been minimized.

Copy link
@rallytime

rallytime Feb 24, 2018

Contributor

This should be Fluorine for the develop branch.

This comment has been minimized.

Copy link
@mephi42

mephi42 Feb 24, 2018

Author Contributor

Done

@mephi42 mephi42 force-pushed the mephi42:develop branch from 5cce8d7 to 7435782 Feb 24, 2018

@mephi42 mephi42 force-pushed the mephi42:develop branch from 7435782 to 4699617 Feb 24, 2018

@mephi42

This comment has been minimized.

Copy link
Contributor Author

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

jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #2535 — ABORTED
Details
codeclimate 1 issue to fix
Details
default Build finished.
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #14924 — FAILURE
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #20180 — FAILURE
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #7098 — FAILURE
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #16586 — FAILURE
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #22580 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #19535 — SUCCESS
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.