Backed out 2 changesets (bug 1532783) for causing Gecko Decision Task bustage. CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Fri, 08 Mar 2019 08:41:39 +0200
changeset 463110 54ed5eac2abca2519704c74bc5c421b846031504
parent 463109 6943cbd4af0564fb1b33922bf90ba48370c0439a
child 463111 7452e8eb8738b77c509911ff4c3058246d16ea0d
child 463168 15d3e8135d577b3ef62ca25050b4bdd6c0af8142
push id79997
push usernbeleuzu@mozilla.com
push dateFri, 08 Mar 2019 06:46:36 +0000
treeherderautoland@54ed5eac2abc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1532783
milestone67.0a1
backs out722b3915da319bd9cab0a9f2a43c18b75585ffec
421bdcc103d3d2f10e1e5f3a8cad736dad789f69
first release with
nightly linux32
54ed5eac2abc / 67.0a1 / 20190308093915 / files
nightly linux64
54ed5eac2abc / 67.0a1 / 20190308093915 / files
nightly mac
54ed5eac2abc / 67.0a1 / 20190308093915 / files
nightly win32
54ed5eac2abc / 67.0a1 / 20190308093915 / files
nightly win64
54ed5eac2abc / 67.0a1 / 20190308093915 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1532783) for causing Gecko Decision Task bustage. CLOSED TREE Backed out changeset 722b3915da31 (bug 1532783) Backed out changeset 421bdcc103d3 (bug 1532783)
taskcluster/taskgraph/transforms/job/__init__.py
taskcluster/taskgraph/transforms/job/mozharness_test.py
taskcluster/taskgraph/transforms/task.py
--- a/taskcluster/taskgraph/transforms/job/__init__.py
+++ b/taskcluster/taskgraph/transforms/job/__init__.py
@@ -125,33 +125,16 @@ def rewrite_when_to_optimization(config,
 
         # "only when files changed" implies "skip if files have not changed"
         job['optimization'] = {'skip-unless-changed': files_changed}
 
         assert 'when' not in job
         yield job
 
 
-@transforms.add
-def set_implementation(config, jobs):
-    for job in jobs:
-        impl, os = worker_type_implementation(job['worker-type'])
-        if os:
-            job.setdefault('tags', {})['os'] = os
-        if impl:
-            job.setdefault('tags', {})['worker-implementation'] = impl
-        worker = job.setdefault('worker', {})
-        assert 'implementation' not in worker
-        worker['implementation'] = impl
-        if os:
-            worker['os'] = os
-
-        yield job
-
-
 def get_attribute(dict, key, attributes, attribute_name):
     '''Get `attribute_name` from the given `attributes` dict, and if there
     is a corresponding value, set `key` in `dict` to that value.'''
     value = attributes.get(attribute_name)
     if value:
         dict[key] = value
 
 
@@ -218,17 +201,18 @@ def use_fetches(config, jobs):
                     }
                     if dest is not None:
                         fetch['dest'] = dest
                     job_fetches.append(fetch)
 
         env = job.setdefault('worker', {}).setdefault('env', {})
         env['MOZ_FETCHES'] = {'task-reference': json.dumps(job_fetches, sort_keys=True)}
 
-        if job['worker']['os'] in ('windows', 'macosx'):
+        impl, os = worker_type_implementation(job['worker-type'])
+        if os in ('windows', 'macosx'):
             env.setdefault('MOZ_FETCHES_DIR', 'fetches')
         else:
             workdir = job['run'].get('workdir', '/builds/worker')
             env.setdefault('MOZ_FETCHES_DIR', '{}/fetches'.format(workdir))
 
         yield job
 
 
@@ -240,33 +224,44 @@ def make_task_description(config, jobs):
     for job in jobs:
         if 'label' not in job:
             if 'name' not in job:
                 raise Exception("job has neither a name nor a label")
             job['label'] = '{}-{}'.format(config.kind, job['name'])
         if job.get('name'):
             del job['name']
 
+        impl, os = worker_type_implementation(job['worker-type'])
+        if os:
+            job.setdefault('tags', {})['os'] = os
+        if impl:
+            job.setdefault('tags', {})['worker-implementation'] = impl
+        worker = job.setdefault('worker', {})
+        assert 'implementation' not in worker
+        worker['implementation'] = impl
+        if os:
+            worker['os'] = os
+
         # always-optimized tasks never execute, so have no workdir
         if job['run']['using'] != 'always-optimized':
             job['run'].setdefault('workdir', '/builds/worker')
 
         taskdesc = copy.deepcopy(job)
 
         # fill in some empty defaults to make run implementations easier
         taskdesc.setdefault('attributes', {})
         taskdesc.setdefault('dependencies', {})
         taskdesc.setdefault('soft-dependencies', [])
         taskdesc.setdefault('routes', [])
         taskdesc.setdefault('scopes', [])
         taskdesc.setdefault('extra', {})
 
         # give the function for job.run.using on this worker implementation a
         # chance to set up the task description.
-        configure_taskdesc_for_run(config, job, taskdesc, job['worker']['implementation'])
+        configure_taskdesc_for_run(config, job, taskdesc, impl)
         del taskdesc['run']
 
         # yield only the task description, discarding the job description
         yield taskdesc
 
 
 # A registry of all functions decorated with run_job_using
 registry = {}
--- a/taskcluster/taskgraph/transforms/job/mozharness_test.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py
@@ -199,26 +199,34 @@ def mozharness_test_on_generic_worker(co
             'name': 'public/test_info',
             'path': 'build/blobber_upload_dir',
             'type': 'directory'
         })
 
     upstream_task = '<build-signing>' if mozharness['requires-signed-builds'] else '<build>'
     installer_url = get_artifact_url(upstream_task, mozharness['build-artifact-name'])
 
+    taskdesc['scopes'].extend(
+        ['generic-worker:os-group:{}/{}'.format(
+            job['worker-type'],
+            group
+        ) for group in test['os-groups']])
+
     worker['os-groups'] = test['os-groups']
 
     # run-as-administrator is a feature for workers with UAC enabled and as such should not be
     # included in tasks on workers that have UAC disabled. Currently UAC is only enabled on
     # gecko Windows 10 workers, however this may be subject to change. Worker type
     # environment definitions can be found in https://github.com/mozilla-releng/OpenCloudConfig
     # See https://docs.microsoft.com/en-us/windows/desktop/secauthz/user-account-control
     # for more information about UAC.
     if test.get('run-as-administrator', False):
         if job['worker-type'].startswith('aws-provisioner-v1/gecko-t-win10-64'):
+            taskdesc['scopes'].extend(
+                ['generic-worker:run-as-administrator:{}'.format(job['worker-type'])])
             worker['run-as-administrator'] = True
         else:
             raise Exception('run-as-administrator not supported on {}'.format(job['worker-type']))
 
     if test['reboot']:
         raise Exception('reboot: {} not supported on generic-worker'.format(test['reboot']))
 
     worker['max-run-time'] = test['max-run-time']
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -803,40 +803,32 @@ def build_generic_worker_payload(config,
             if 'artifact' in mount['content']:
                 if not mount['content']['artifact'].startswith('public/'):
                     task_def['scopes'].append(
                         'queue:get-artifact:{}'.format(mount['content']['artifact']))
 
     if mounts:
         task_def['payload']['mounts'] = mounts
 
-    if worker.get('os-groups'):
+    if worker.get('os-groups', []):
         task_def['payload']['osGroups'] = worker['os-groups']
-        task_def['scopes'].extend(
-            ['generic-worker:os-group:{}/{}'.format(
-                task['worker-type'],
-                group
-            ) for group in worker['os-groups']])
 
     features = {}
 
     if worker.get('chain-of-trust'):
         features['chainOfTrust'] = True
 
     if worker.get('taskcluster-proxy'):
         features['taskclusterProxy'] = True
         # this will soon be provided directly by the worker:
         # https://bugzilla.mozilla.org/show_bug.cgi?id=1460015
         worker['env']['TASKCLUSTER_PROXY_URL'] = 'http://taskcluster'
 
     if worker.get('run-as-administrator', False):
         features['runAsAdministrator'] = True
-        task_def['scopes'].append(
-            'generic-worker:run-as-adminstrator:{}'.format(task['worker-type']),
-        )
 
     if features:
         task_def['payload']['features'] = features
 
     # coalesce / superseding
     if 'coalesce' in task:
         task_def['payload']['supersederUrl'] = superseder_url(config, task)