Skip to content

Commit

Permalink
Change task timeout limit to 3 days
Browse files Browse the repository at this point in the history
As ChromeOS CTS/GTS qualification suite may take at most 2 days to
complete, change the swarming client task timeout limit from 1 day to 3
days.

Relavent discussion:
https://groups.google.com/a/google.com/forum/?utm_medium=email&utm_source=footer#!msg/chromeos-infra-discuss/AOQP2CD90oE/sc3D1jm_AAAJ

R=vadimsh@chromium.org
BUG=746327

Review-Url: https://codereview.chromium.org/2984773002
  • Loading branch information
pwang316 authored and Commit Bot committed Jul 24, 2017
1 parent f59af78 commit 710ff0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions appengine/swarming/server/task_request.py
Expand Up @@ -75,8 +75,8 @@
MAXIMUM_PRIORITY = 255


# One day in seconds. Add 10s to account for small jitter.
_ONE_DAY_SECS = 24*60*60 + 10
# Three days in seconds. Add 10s to account for small jitter.
_THREE_DAY_SECS = 3*24*60*60 + 10


# Seven day in seconds. Add 10s to account for small jitter.
Expand Down Expand Up @@ -227,10 +227,10 @@ def _validate_task_run_id(_prop, value):

def _validate_timeout(prop, value):
"""Validates timeouts in seconds in TaskProperties."""
if value and not (_MIN_TIMEOUT_SECS <= value <= _ONE_DAY_SECS):
if value and not (_MIN_TIMEOUT_SECS <= value <= _THREE_DAY_SECS):
# pylint: disable=W0212
raise datastore_errors.BadValueError(
'%s (%ds) must be 0 or between %ds and one day' %
'%s (%ds) must be 0 or between %ds and three days' %
(prop._name, value, _MIN_TIMEOUT_SECS))


Expand Down
5 changes: 3 additions & 2 deletions appengine/swarming/server/task_request_test.py
Expand Up @@ -570,9 +570,10 @@ def mkcipdreq(idempotent=False, **cipd_input):
# Execution timeout.
with self.assertRaises(datastore_errors.BadValueError):
mkreq(_gen_request(
properties=dict(execution_timeout_secs=task_request._ONE_DAY_SECS+1)))
properties=dict(
execution_timeout_secs=task_request._THREE_DAY_SECS+1)))
mkreq(_gen_request(
properties=dict(execution_timeout_secs=task_request._ONE_DAY_SECS)))
properties=dict(execution_timeout_secs=task_request._THREE_DAY_SECS)))

# Expiration.
now = utils.utcnow()
Expand Down

0 comments on commit 710ff0d

Please sign in to comment.