Bug 1280570 - Retrigger tc tasks when mozharness returns TBPL_RETRY; r=dustin

This commit is contained in:
Geoff Brown
2016-10-07 10:20:15 -06:00
parent 2b84e55333
commit 614b2c2f67
6 changed files with 27 additions and 1 deletions

View File

@@ -197,6 +197,10 @@ task_description_schema = Schema({
# the maximum time to run, in seconds
'max-run-time': int,
# the exit status code that indicates the task should be retried
Optional('retry-exit-status'): int,
}, {
Required('implementation'): 'generic-worker',
@@ -348,6 +352,9 @@ def build_docker_worker_payload(config, task, task_def):
if 'max-run-time' in worker:
payload['maxRunTime'] = worker['max-run-time']
if 'retry-exit-status' in worker:
payload['onExitStatus'] = {'retry': [worker['retry-exit-status']]}
if 'artifacts' in worker:
artifacts = {}
for artifact in worker['artifacts']:
@@ -398,6 +405,9 @@ def build_generic_worker_payload(config, task, task_def):
'maxRunTime': worker['max-run-time'],
}
if 'retry-exit-status' in worker:
raise Exception("retry-exit-status not supported in generic-worker")
transforms = TransformSequence()