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 passing request-timeout from NewRequest all the way down #51042

Merged
merged 1 commit into from Feb 7, 2018

Conversation

soltysh
Copy link
Contributor

@soltysh soltysh commented Aug 21, 2017

What this PR does / why we need it:
Currently if you pass --request-timeout it's not passed all the way down to the actual request object. There's a separate field on the Request object that allows setting that timeout, but it's not taken from that flag.

@smarterclayton @deads2k ptal, this is coming from openshift/origin#13701

@soltysh soltysh added the release-note-none Denotes a PR that doesn't merit a release note. label Aug 21, 2017
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 21, 2017
@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 21, 2017
@@ -130,6 +130,7 @@ func NewRequest(client HTTPClient, verb string, baseURL *url.URL, versionedAPIPa
serializers: serializers,
backoffMgr: backoff,
throttle: throttle,
timeout: timeout,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you describe what you think this sets? It actually sets a query parameter on our request for the apiserver to consume, not a timeout on the client side. I doubt that's what most callers would expect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's exactly my intention with this change. The downstream problem (https://bugzilla.redhat.com/show_bug.cgi?id=1433244) was that --request-timeout wasn't passed to apiserver, which although I've allowed this functionality to be long-running request, is being cut off by the apiserver.

Copy link
Contributor

Choose a reason for hiding this comment

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

@deads2k the client-side timeout added by #33958 did not handles cases where the user requested a longer timeout, but the apiserver ended the request first. --request-timeout worked under the assumption that the client would be the one always terminating the connection

Copy link
Contributor

Choose a reason for hiding this comment

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

@deads2k the client-side timeout added by #33958 did not handles cases where the user requested a longer timeout, but the apiserver ended the request first. --request-timeout worked under the assumption that the client would be the one always terminating the connection

@juanvallejo more specifically. You think using the same value for both is a good idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From a user POV - I think the answer is yes. I'm not 100% sure about eventual downsides, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with having both match if the CLI behavior matches expectations. @juanvallejo and @fabianofranz probably have more opinion there.

Is this set non-zero somewhere? The code you updated all seems to set zero

@soltysh
Copy link
Contributor Author

soltysh commented Aug 29, 2017

/unassign @resouer @smarterclayton
/assign @deads2k

@soltysh
Copy link
Contributor Author

soltysh commented Oct 11, 2017

@fabianofranz do you have any objections here, if not I'd like to rebase it and push it forward?

@fabianofranz
Copy link
Contributor

@soltysh works for me.

}
return NewRequest(c.Client, verb, c.base, c.versionedAPIPath, c.contentConfig, c.serializers, backoff, c.Throttle)
return NewRequest(c.Client, verb, c.base, c.versionedAPIPath, c.contentConfig, c.serializers, backoff, c.Throttle, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is different in your patch in origin. Which is it supposed to be?

@k8s-github-robot
Copy link

This PR hasn't been active in 30 days. It will be closed in 59 days (Jan 21, 2018).

cc @deads2k @soltysh

You can add 'keep-open' label to prevent this from happening, or add a comment to keep it open another 90 days

@soltysh
Copy link
Contributor Author

soltysh commented Feb 6, 2018

@juanvallejo @deads2k I've updated the PR ptal

@deads2k
Copy link
Contributor

deads2k commented Feb 6, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 6, 2018
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

7 similar comments
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@soltysh
Copy link
Contributor Author

soltysh commented Feb 7, 2018

/hold
failures are related

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 7, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, soltysh

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2018
@soltysh
Copy link
Contributor Author

soltysh commented Feb 7, 2018

/hold cancel
The tests should be fixed. I'm self applying the lgtm, since that only was updating tests with the new parameter that was added to NewRequest method.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 7, 2018
@soltysh soltysh added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2018
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Feb 7, 2018

@soltysh: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-bazel f881544 link /test pull-kubernetes-bazel
pull-kubernetes-bazel-test 7da1002 link /test pull-kubernetes-bazel-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 59276, 51042, 58973, 59377, 59472). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 1f62514 into kubernetes:master Feb 7, 2018
@soltysh soltysh deleted the request_timeout branch February 7, 2018 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants