Backed out changeset bce9cb28665c (bug 1486532) for OS X exceptions
authorAndreea Pavel <apavel@mozilla.com>
Wed, 29 Aug 2018 18:33:28 +0300
changeset 433905 b38bcb2c577c0e5052ae595ef572b301aa88046e
parent 433904 1586964885f9449cfd189c41a684ebbaee433518
child 433906 3db3193ec938e49a0ea38705cd32310e055859a3
push id34525
push useraiakab@mozilla.com
push dateWed, 29 Aug 2018 21:52:41 +0000
treeherdermozilla-central@b946a1ac70e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1486532
milestone63.0a1
backs outbce9cb28665c0bb100267cbb956290a00c447721
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
Backed out changeset bce9cb28665c (bug 1486532) for OS X exceptions
taskcluster/taskgraph/transforms/task.py
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -966,65 +966,57 @@ def build_docker_worker_payload(config, 
 
     check_caches_are_volumes(task)
 
 
 @payload_builder('generic-worker')
 def build_generic_worker_payload(config, task, task_def):
     worker = task['worker']
 
-    task_def['payload'] = {
-        'command': worker['command'],
-        'maxRunTime': worker['max-run-time'],
-    }
-
-    env = worker.get('env', {})
-
-    if task.get('needs-sccache'):
-        env['USE_SCCACHE'] = '1'
-        # Disable sccache idle shutdown.
-        env['SCCACHE_IDLE_TIMEOUT'] = '0'
-    else:
-        env['SCCACHE_DISABLE'] = '1'
-
-    if env:
-        task_def['payload']['env'] = env
-
     artifacts = []
 
     for artifact in worker.get('artifacts', []):
         a = {
             'path': artifact['path'],
             'type': artifact['type'],
+            'expires': task_def['expires'],  # always expire with the task
         }
         if 'name' in artifact:
             a['name'] = artifact['name']
         artifacts.append(a)
 
-    if artifacts:
-        task_def['payload']['artifacts'] = artifacts
-
     # Need to copy over mounts, but rename keys to respect naming convention
     #   * 'cache-name' -> 'cacheName'
     #   * 'task-id'    -> 'taskId'
     # All other key names are already suitable, and don't need renaming.
     mounts = deepcopy(worker.get('mounts', []))
     for mount in mounts:
         if 'cache-name' in mount:
             mount['cacheName'] = mount.pop('cache-name')
         if 'content' in mount:
             if 'task-id' in mount['content']:
                 mount['content']['taskId'] = mount['content'].pop('task-id')
 
-    if worker.get('mounts', []):
-        task_def['payload']['mounts'] = worker['mounts']
+    task_def['payload'] = {
+        'command': worker['command'],
+        'artifacts': artifacts,
+        'env': worker.get('env', {}),
+        'mounts': mounts,
+        'maxRunTime': worker['max-run-time'],
+        'osGroups': worker.get('os-groups', []),
+    }
 
-    if worker.get('os-groups', []):
-        task_def['payload']['osGroups'] = worker['os-groups']
+    if task.get('needs-sccache'):
+        worker['env']['USE_SCCACHE'] = '1'
+        # Disable sccache idle shutdown.
+        worker['env']['SCCACHE_IDLE_TIMEOUT'] = '0'
+    else:
+        worker['env']['SCCACHE_DISABLE'] = '1'
 
+    # currently only support one feature (chain of trust) but this will likely grow
     features = {}
 
     if worker.get('chain-of-trust'):
         features['chainOfTrust'] = True
 
     if worker.get('taskcluster-proxy'):
         features['taskclusterProxy'] = True
 
@@ -1347,19 +1339,16 @@ def set_defaults(config, tasks):
             worker.setdefault('volumes', [])
             worker.setdefault('env', {})
             if 'caches' in worker:
                 for c in worker['caches']:
                     c.setdefault('skip-untrusted', False)
         elif worker['implementation'] == 'generic-worker':
             worker.setdefault('env', {})
             worker.setdefault('os-groups', [])
-            if worker['os-groups'] and worker['os'] != 'windows':
-                raise Exception('os-groups feature of generic-worker is only supported on '
-                                'Windows, not on {}'.format(worker['os']))
             worker.setdefault('chain-of-trust', False)
         elif worker['implementation'] in (
             'scriptworker-signing', 'beetmover', 'beetmover-push-to-release', 'beetmover-maven',
         ):
             worker.setdefault('max-run-time', 600)
         elif worker['implementation'] == 'push-apk':
             worker.setdefault('commit', False)