bug 1437577 - preserve treeherder.platform from job into task. r?dustin
Tasks like upload-symbols that have a dependency on a build job want to
copy the treeherder.platform from the build job but it gets lost in
the task transform currently. This simply copies it into
an extra.treeherder-platform key to make life easier.
MozReview-Commit-ID: H4PtC4mvIYA
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -1537,16 +1537,17 @@ def build_task(config, tasks):
routes = task.get('routes', [])
scopes = [s.format(level=level, project=project) for s in task.get('scopes', [])]
# set up extra
extra = task.get('extra', {})
extra['parent'] = os.environ.get('TASK_ID', '')
task_th = task.get('treeherder')
if task_th:
+ extra.setdefault('treeherder-platform', task_th['platform'])
treeherder = extra.setdefault('treeherder', {})
machine_platform, collection = task_th['platform'].split('/', 1)
treeherder['machine'] = {'platform': machine_platform}
treeherder['collection'] = {collection: True}
group_names = config.graph_config['treeherder']['group-names']
groupSymbol, symbol = split_symbol(task_th['symbol'])