Bug 1289779 - Make sure that different docker-image tasks use different job symbols. r=dustin, a=NPOTB
authorHammad Akhtar <hammad13060@iiitd.ac.in>
Tue, 13 Dec 2016 13:39:47 +0530
changeset 353013 55bfc9ee4482506acbae39d6052e3bfe9f00a0c5
parent 353012 a82ed29ac0e552bf054675564eef70ead8e1edf2
child 353014 cf05a9412d74507d07f3c6893141ba43ddb8bbaf
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin, NPOTB
bugs1289779
milestone52.0a2
Bug 1289779 - Make sure that different docker-image tasks use different job symbols. r=dustin, a=NPOTB MozReview-Commit-ID: 2sn231bKJ1z
taskcluster/ci/docker-image/image.yml
taskcluster/ci/docker-image/kind.yml
taskcluster/taskgraph/task/docker_image.py
--- a/taskcluster/ci/docker-image/image.yml
+++ b/taskcluster/ci/docker-image/image.yml
@@ -60,9 +60,9 @@ task:
       imageName: '{{image_name}}'
     treeherderEnv:
       - staging
       - production
     treeherder:
       jobKind: other
       build:
         platform: 'taskcluster-images'
-      symbol: 'I'
+      groupSymbol: 'I'
--- a/taskcluster/ci/docker-image/kind.yml
+++ b/taskcluster/ci/docker-image/kind.yml
@@ -6,14 +6,14 @@ implementation: 'taskgraph.task.docker_i
 images_path: '../../../testing/docker'
 
 # make a task for each docker-image we might want.  For the moment, since we
 # write artifacts for each, these are whitelisted, but ideally that will change
 # (to use subdirectory clones of the proper directory), at which point we can
 # generate tasks for every docker image in the directory, secure in the
 # knowledge that unnecessary images will be omitted from the target task graph
 images:
-  - desktop-test
-  - desktop1604-test
-  - desktop-build
-  - tester
-  - lint
-  - android-gradle-build
+  desktop-test: dt
+  desktop1604-test: dt16t
+  desktop-build: db
+  tester: tst
+  lint: lnt
+  android-gradle-build: agb
--- a/taskcluster/taskgraph/task/docker_image.py
+++ b/taskcluster/taskgraph/task/docker_image.py
@@ -53,27 +53,31 @@ class DockerImageTask(base.Task):
             'source': '{repo}file/{rev}/taskcluster/ci/docker-image/image.yml'
                       .format(repo=params['head_repository'], rev=params['head_rev']),
             'index_image_prefix': INDEX_PREFIX,
             'artifact_path': 'public/image.tar.zst',
         }
 
         tasks = []
         templates = Templates(path)
-        for image_name in config['images']:
+        for image_name, image_symbol in config['images'].iteritems():
             context_path = os.path.join('testing', 'docker', image_name)
             context_hash = generate_context_hash(GECKO, context_path, image_name)
 
             image_parameters = dict(parameters)
             image_parameters['image_name'] = image_name
             image_parameters['context_hash'] = context_hash
 
             image_task = templates.load('image.yml', image_parameters)
             attributes = {'image_name': image_name}
 
+            # unique symbol for different docker image
+            if 'extra' in image_task['task']:
+                image_task['task']['extra']['treeherder']['symbol'] = image_symbol
+
             # As an optimization, if the context hash exists for a high level, that image
             # task ID will be used.  The reasoning behind this is that eventually everything ends
             # up on level 3 at some point if most tasks use this as a common image
             # for a given context hash, a worker within Taskcluster does not need to contain
             # the same image per branch.
             index_paths = ['{}.level-{}.{}.hash.{}'.format(
                                 INDEX_PREFIX, level, image_name, context_hash)
                            for level in range(int(params['level']), 4)]