Commit 0aa48cc1 authored by John Budorick's avatar John Budorick Committed by LUCI CQ

presubmit: restore default 8-minute timeout.

This logic's predecessor, run_presubmit, used an 8-minute timeout in
all cases other than luci-py. Using that as a default (rather than 0s)
seems reasonable.

Recipe-Nontrivial-Roll: build
Change-Id: I4b8668531db1a243709979b580c5170c22a0729f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2020987
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@google.com>
parent 1a5fe235
......@@ -757,13 +757,13 @@ Raises:
[DEPS](/recipes/recipe_modules/presubmit/__init__.py#11): [bot\_update](#recipe_modules-bot_update), [depot\_tools](#recipe_modules-depot_tools), [gclient](#recipe_modules-gclient), [git](#recipe_modules-git), [tryserver](#recipe_modules-tryserver), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/cq][recipe_engine/recipe_modules/cq], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step]
#### **class [PresubmitApi](/recipes/recipe_modules/presubmit/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
#### **class [PresubmitApi](/recipes/recipe_modules/presubmit/api.py#16)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
&mdash; **def [\_\_call\_\_](/recipes/recipe_modules/presubmit/api.py#26)(self, \*args, \*\*kwargs):**
&mdash; **def [\_\_call\_\_](/recipes/recipe_modules/presubmit/api.py#28)(self, \*args, \*\*kwargs):**
Return a presubmit step.
&mdash; **def [execute](/recipes/recipe_modules/presubmit/api.py#75)(self, bot_update_step):**
&mdash; **def [execute](/recipes/recipe_modules/presubmit/api.py#77)(self, bot_update_step):**
Runs presubmit and sets summary markdown if applicable.
......@@ -772,7 +772,7 @@ Args:
Returns:
a RawResult object, suitable for being returned from RunSteps.
&mdash; **def [prepare](/recipes/recipe_modules/presubmit/api.py#39)(self):**
&mdash; **def [prepare](/recipes/recipe_modules/presubmit/api.py#41)(self):**
Set up a presubmit run.
......@@ -787,7 +787,7 @@ This expects the gclient configuration to already have been set.
Returns:
the StepResult from the bot_update step.
&emsp; **@property**<br>&mdash; **def [presubmit\_support\_path](/recipes/recipe_modules/presubmit/api.py#22)(self):**
&emsp; **@property**<br>&mdash; **def [presubmit\_support\_path](/recipes/recipe_modules/presubmit/api.py#24)(self):**
### *recipe_modules* / [tryserver](/recipes/recipe_modules/tryserver)
[DEPS](/recipes/recipe_modules/tryserver/__init__.py#5): [gerrit](#recipe_modules-gerrit), [git](#recipe_modules-git), [git\_cl](#recipe_modules-git_cl), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
......
......@@ -7,6 +7,11 @@ from recipe_engine import recipe_api
from PB.recipe_engine import result as result_pb2
from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb2
# 8 minutes seems like a reasonable upper bound on presubmit timings.
# According to event mon data we have, it seems like anything longer than
# this is a bug, and should just instant fail.
_DEFAULT_TIMEOUT_S = 480
class PresubmitApi(recipe_api.RecipeApi):
......@@ -14,10 +19,7 @@ class PresubmitApi(recipe_api.RecipeApi):
super(PresubmitApi, self).__init__(**kwargs)
self._runhooks = properties.runhooks
# 8 minutes seems like a reasonable upper bound on presubmit timings.
# According to event mon data we have, it seems like anything longer than
# this is a bug, and should just instant fail.
self._timeout_s = properties.timeout_s
self._timeout_s = properties.timeout_s or _DEFAULT_TIMEOUT_S
@property
def presubmit_support_path(self):
......
......@@ -9,5 +9,6 @@ message InputProperties {
// Whether gclient hooks should be run when setting up the checkout.
bool runhooks = 1;
// Timeout for presubmit execution, in seconds.
// Defaults to 480s (8 minutes).
int32 timeout_s = 2;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment