Bug 1286075: set ARTIFACT_TASKID correctly for upload-symbol jobs; r=gps draft
authorDustin J. Mitchell <dustin@mozilla.com>
Fri, 09 Sep 2016 19:05:18 +0000
changeset 412714 1890bcf94059a3ffd6d8fd1613e3be48d502f27c
parent 412674 13e09cb5ffe9e9da162fbf048885aa2a4a9020d3
child 412715 26c16cb14bb9f7bb90cbea717222f86b07af37d3
push id29252
push userdmitchell@mozilla.com
push dateMon, 12 Sep 2016 19:16:39 +0000
reviewersgps
bugs1286075
milestone51.0a1
Bug 1286075: set ARTIFACT_TASKID correctly for upload-symbol jobs; r=gps Also, don't include treeherder info for upload-symbols. This information is not used, as the tasks have no routes that would cause them to report to treeherder. MozReview-Commit-ID: Ji7db0eUL2G
taskcluster/ci/legacy/tasks/post-builds/upload_symbols.yml
taskcluster/taskgraph/task/legacy.py
--- a/taskcluster/ci/legacy/tasks/post-builds/upload_symbols.yml
+++ b/taskcluster/ci/legacy/tasks/post-builds/upload_symbols.yml
@@ -26,18 +26,9 @@ task:
 
     maxRunTime: 600
 
     command: ["/bin/bash", "bin/upload.sh"]
 
     env:
       GECKO_HEAD_REPOSITORY: '{{head_repository}}'
       GECKO_HEAD_REV: '{{head_rev}}'
-      ARTIFACT_TASKID: '{{build_slugid}}'
-
-  extra:
-    treeherderEnv:
-      - production
-      - staging
-    treeherder:
-      groupSymbol: tc
-      groupName: Submitted by taskcluster
-      symbol: us
+      ARTIFACT_TASKID: {"task-reference": "<{{build_slugid}}>"}
--- a/taskcluster/taskgraph/task/legacy.py
+++ b/taskcluster/taskgraph/task/legacy.py
@@ -98,32 +98,34 @@ def configure_dependent_task(task_path, 
     task = templates.load(task_path, parameters)
     task['taskId'] = taskid
 
     if 'requires' not in task:
         task['requires'] = []
 
     task['requires'].append(parameters['build_slugid'])
 
-    if 'treeherder' not in task['task']['extra']:
-        task['task']['extra']['treeherder'] = {}
+    if 'extra' not in task['task']:
+        task['task']['extra'] = {}
 
-    # Copy over any treeherder configuration from the build so
-    # tests show up under the same platform...
-    treeherder_config = task['task']['extra']['treeherder']
+    # only set up treeherder information if the task contained any to begin with
+    if 'treeherder' in task['task']['extra']:
+        # Copy over any treeherder configuration from the build so
+        # tests show up under the same platform...
+        treeherder_config = task['task']['extra']['treeherder']
 
-    treeherder_config['collection'] = \
-        build_treeherder_config.get('collection', {})
+        treeherder_config['collection'] = \
+            build_treeherder_config.get('collection', {})
 
-    treeherder_config['build'] = \
-        build_treeherder_config.get('build', {})
+        treeherder_config['build'] = \
+            build_treeherder_config.get('build', {})
 
-    if 'machine' not in treeherder_config:
-        treeherder_config['machine'] = \
-            build_treeherder_config.get('machine', {})
+        if 'machine' not in treeherder_config:
+            treeherder_config['machine'] = \
+                build_treeherder_config.get('machine', {})
 
     if 'routes' not in task['task']:
         task['task']['routes'] = []
 
     if 'scopes' not in task['task']:
         task['task']['scopes'] = []
 
     return task