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

Timeout fixes #668

Merged
merged 2 commits into from
Oct 1, 2020
Merged

Conversation

haircommander
Copy link
Contributor

What type of PR is this?

/kind bug
/kind api-change

What this PR does / why we need it:

Adds two fixes to the runp/create --timeout feature
1: correctly use the timeout passed in by not multiplying it by time.Seconds (a relic from when it was originally specified as an int, oops)
2: change the option to --cancel-timeout and -T to not overload --timeout and -t (Which has a different meaning in the top level flags, and could confuse users)

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Update the `timeout` option in create, run, runp requests to be `cancel-timeout`

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 30, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 30, 2020
@haircommander haircommander force-pushed the timeout-fixes branch 3 times, most recently from 4019c08 to ea40d4c Compare September 30, 2020 20:43
Before, we were always multiplying the timeout by time.Seconds, instead of using the time.Duration provided to us

Signed-off-by: Peter Hunt <pehunt@redhat.com>
there already exists a top level `-t` option for a timeout for connecting to the server
If we overload `-t`, users (read: I) could get confused and specify it in the wrong place.

Change the `--timeout` option for cancelling the context to `cancel-timeout` with the short option of `-T`

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 1, 2020
@saschagrunert
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, saschagrunert

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 1, 2020
@k8s-ci-robot k8s-ci-robot merged commit 520c78e into kubernetes-sigs:master Oct 1, 2020
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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants