Bug 1289779 - Make sure that different docker-image tasks use different job symbols; r?dustin draft
authorHammad Akhtar <hammad13060@iiitd.ac.in>
Tue, 13 Dec 2016 13:39:47 +0530
changeset 449240 575ad662d6d5df18cb16abe2dc185e98ff1c660f
parent 448717 f46f85dcfbc2b3098ea758825d18be6fab33cbc6
child 539449 5720c363017dca74ec02d60a5970a6fe0a272325
push id38518
push userhammad13060@iiitd.ac.in
push dateTue, 13 Dec 2016 16:54:02 +0000
reviewersdustin
bugs1289779
milestone53.0a1
Bug 1289779 - Make sure that different docker-image tasks use different job symbols; r?dustin 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)]