Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

use different timeouts for all vcs commands #879

Merged
merged 1 commit into from
Jul 23, 2017

Conversation

erizocosmico
Copy link
Contributor

What does this do / why do we need it?

both runFromRepoDir and runFromCwd accept now a timeout to control the timeouts of the underlying monitoredCmd, instead of having a hardcoded timeout of 2 minutes for all commands.
This will allow better tuning of the timeouts on a per-command basis.

Right now, as the timeouts are really naive I've just added two kinds of timeouts:

  • expensiveCmdTimeout: a cmd that is expensive such as clones, fetches, updates, ...
  • defaultCmdTimeout: any other non-remote or non-expensive cmd

I expect these to change during the review when the timeouts are better adjusted, anyway 😛

What should your reviewer look out for in this PR?

The timeouts are a bit naive right now. I am familiar with git commands but not with all other vcs commands, so the rule I followed was: remote -> expensive, non-remote -> default timeout. So if you see a timeout that seems a bit off, tell me so I can adjust it 😄

Do you need help or clarification on anything?

Basically just check the timeouts, specially on non-git vcs's.

Which issue(s) does this PR fix?

Fixes #872

both `runFromRepoDir` and `runFromCwd` accept now a timeout to control
the timeouts of the underlying `monitoredCmd`, instead of having a
hardcoded timeout of 2 minutes for all commands.
This will allow better tuning of the timeouts on a per-command basis.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Copy link
Member

@sdboyer sdboyer left a comment

Choose a reason for hiding this comment

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

LGTM as a first step - thanks!

@sdboyer sdboyer merged commit 0a63c47 into golang:master Jul 23, 2017
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use varied command timeout length for different vcs commands
3 participants