Bug 1442545: Add max-run-time to signing workers; r=Callek
authorTom Prince <mozilla@hocat.ca>
Wed, 18 Apr 2018 13:04:09 -0600
changeset 468095 2e43f41eb784c98fffccb8cfa61cefc0f745af38
parent 468094 0a202b97948b0c517531219786fe136969052ddd
child 468096 fc930141faf9f34e2c951da7582c01054807c14c
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1442545
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1442545: Add max-run-time to signing workers; r=Callek Differential Revision: https://phabricator.services.mozilla.com/D974
taskcluster/taskgraph/transforms/signing.py
--- a/taskcluster/taskgraph/transforms/signing.py
+++ b/taskcluster/taskgraph/transforms/signing.py
@@ -61,16 +61,19 @@ signing_description_schema = Schema({
     # below transforms for defaults of various values.
     Optional('treeherder'): task_description_schema['treeherder'],
 
     # Routes specific to this task, if defined
     Optional('routes'): [basestring],
 
     Optional('shipping-phase'): task_description_schema['shipping-phase'],
     Optional('shipping-product'): task_description_schema['shipping-product'],
+
+    # Optional control for how long a task may run (aka maxRunTime)
+    Optional('max-run-time'): int,
 })
 
 
 @transforms.add
 def set_defaults(config, jobs):
     for job in jobs:
         job.setdefault('depname', 'build')
         yield job
@@ -139,17 +142,17 @@ def make_task_description(config, jobs):
         )
 
         task = {
             'label': label,
             'description': description,
             'worker-type': get_worker_type_for_scope(config, signing_cert_scope),
             'worker': {'implementation': 'scriptworker-signing',
                        'upstream-artifacts': job['upstream-artifacts'],
-                       'max-run-time': 3600},
+                       'max-run-time': job.get('max-run-time', 3600)},
             'scopes': [signing_cert_scope] + signing_format_scopes,
             'dependencies': {job['depname']: dep_job.label},
             'attributes': attributes,
             'run-on-projects': dep_job.attributes.get('run_on_projects'),
             'optimization': dep_job.optimization,
             'treeherder': treeherder,
             'routes': job.get('routes', []),
         }