Bug 1389850: use per-level decision and image workers; r=bstack
authorDustin J. Mitchell <dustin@mozilla.com>
Wed, 16 Aug 2017 13:23:13 +0000
changeset 648511 469f4ca42da33d0c11ae7addd155dc5243182d62
parent 648510 2dc6fcbd991b9a189427eee77d1db1b533dd4091
child 648512 135ecb6cf04a9a88254a248a191f7c9cc8a349d9
push id74775
push userbmo:ted@mielczarek.org
push dateThu, 17 Aug 2017 21:15:41 +0000
reviewersbstack
bugs1389850
milestone57.0a1
Bug 1389850: use per-level decision and image workers; r=bstack MozReview-Commit-ID: BoUuPRUgGnm
.taskcluster.yml
taskcluster/taskgraph/action.yml
taskcluster/taskgraph/actions/registry.py
taskcluster/taskgraph/transforms/docker_image.py
taskcluster/taskgraph/util/workertypes.py
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -24,17 +24,17 @@ tasks:
           then:
             name: "Gecko Decision Task"
             description: 'The task that creates all of the other tasks in the task graph'
           else:
             name: "Decision Task for cron job ${cron.job_name}"
             description: 'Created by a [cron task](https://tools.taskcluster.net/tasks/${cron.task_id})'
 
     provisionerId: "aws-provisioner-v1"
-    workerType: "gecko-decision"
+    workerType: "gecko-${repository.level}-decision"
 
     tags:
       $if: 'tasks_for == "hg-push"'
       then: {createdForUser: "${ownerEmail}"}
 
     routes:
       $if: 'tasks_for == "hg-push"'
       then:
@@ -121,14 +121,17 @@ tasks:
       artifacts:
         'public':
           type: 'directory'
           path: '/home/worker/artifacts'
           expires: {$fromNow: '1 year'}
 
     extra:
       treeherder:
-        $if: 'tasks_for == "hg-push"'
-        then:
-          symbol: D
-        else:
-          groupSymbol: cron
-          symbol: "${cron.job_symbol}"
+        $merge:
+          - machine:
+              platform: gecko-decision
+          - $if: 'tasks_for == "hg-push"'
+            then:
+              symbol: D
+            else:
+              groupSymbol: cron
+              symbol: "${cron.job_symbol}"
--- a/taskcluster/taskgraph/action.yml
+++ b/taskcluster/taskgraph/action.yml
@@ -3,17 +3,17 @@ created: '{{now}}'
 deadline: '{{#from_now}}1 day{{/from_now}}'
 expires: '{{#from_now}}14 day{{/from_now}}'
 metadata:
   owner: mozilla-taskcluster-maintenance@mozilla.com
   source: 'https://hg.mozilla.org/{{project}}/file/{{head_rev}}/taskcluster/taskgraph/action.yml'
   name: "[tc] Action Task"
   description: Helps schedule new jobs without new push
 
-workerType: "gecko-decision"
+workerType: "gecko-{{level}}-decision"
 provisionerId: "aws-provisioner-v1"
 schedulerId: "gecko-level-{{level}}"
 
 tags:
   createdForUser: {{owner}}
 
 scopes:
   - {{repo_scope}}
--- a/taskcluster/taskgraph/actions/registry.py
+++ b/taskcluster/taskgraph/actions/registry.py
@@ -190,17 +190,17 @@ def register_callback_action(name, title
                 'metadata': {
                     'owner': 'mozilla-taskcluster-maintenance@mozilla.com',
                     'source': '{}raw-file/{}/{}'.format(
                         parameters['head_repository'], parameters['head_rev'], source_path,
                     ),
                     'name': 'Action: {}'.format(title),
                     'description': 'Task executing callback for action.\n\n---\n' + description,
                 },
-                'workerType': 'gecko-decision',
+                'workerType': 'gecko-{}-decision'.format(parameters['level']),
                 'provisionerId': 'aws-provisioner-v1',
                 'scopes': [
                     repo_scope,
                 ],
                 'tags': {
                     'createdForUser': parameters['owner'],
                     'kind': 'action-callback',
                 },
--- a/taskcluster/taskgraph/transforms/docker_image.py
+++ b/taskcluster/taskgraph/transforms/docker_image.py
@@ -84,17 +84,18 @@ def fill_template(config, tasks):
             'scopes': ['secrets:get:project/taskcluster/gecko/hgfingerprint'],
             'treeherder': {
                 'symbol': job_symbol,
                 'platform': 'taskcluster-images/opt',
                 'kind': 'other',
                 'tier': 1,
             },
             'run-on-projects': [],
-            'worker-type': 'aws-provisioner-v1/gecko-images',
+            'worker-type': 'aws-provisioner-v1/gecko-{}-images'.format(
+                config.params['level']),
             # can't use {in-tree: ..} here, otherwise we might try to build
             # this image..
             'worker': {
                 'implementation': 'docker-worker',
                 'os': 'linux',
                 'docker-image': docker_image('image_builder'),
                 'caches': [{
                     'type': 'persistent',
--- a/taskcluster/taskgraph/util/workertypes.py
+++ b/taskcluster/taskgraph/util/workertypes.py
@@ -1,28 +1,30 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 WORKER_TYPES = {
-    'aws-provisioner-v1/gecko-images': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-1-b-android': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-1-b-linux': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-1-b-macosx64': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-1-b-win2012': ('generic-worker', 'windows'),
+    'aws-provisioner-v1/gecko-1-images': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-2-b-android': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-2-b-linux': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-2-b-macosx64': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-2-b-win2012': ('generic-worker', 'windows'),
+    'aws-provisioner-v1/gecko-2-images': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-3-b-android': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-3-b-linux': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-3-b-macosx64': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-3-b-win2012': ('generic-worker', 'windows'),
+    'aws-provisioner-v1/gecko-3-images': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-symbol-upload': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-t-linux-large': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-t-linux-medium': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-t-linux-xlarge': ('docker-worker', 'linux'),
     'aws-provisioner-v1/gecko-t-win10-64': ('generic-worker', 'windows'),
     'aws-provisioner-v1/gecko-t-win10-64-gpu': ('generic-worker', 'windows'),
     'releng-hardware/gecko-t-win10-64-hw': ('generic-worker', 'windows'),
     'aws-provisioner-v1/gecko-t-win7-32': ('generic-worker', 'windows'),