Bug 1394026 - Tag tasks with os and worker implementation.
MozReview-Commit-ID: GWNiq6a3hlZ
--- a/taskcluster/taskgraph/transforms/job/__init__.py
+++ b/taskcluster/taskgraph/transforms/job/__init__.py
@@ -132,16 +132,20 @@ def make_task_description(config, jobs):
if 'label' not in job:
if 'name' not in job:
raise Exception("job has neither a name nor a label")
job['label'] = '{}-{}'.format(config.kind, job['name'])
if job.get('name'):
del job['name']
impl, os = worker_type_implementation(job['worker-type'])
+ if os:
+ job.setdefault('tags', {})['os'] = os
+ if impl:
+ job.setdefault('tags', {})['worker-implementation'] = impl
worker = job.setdefault('worker', {})
assert 'implementation' not in worker
worker['implementation'] = impl
if os:
worker['os'] = os
taskdesc = copy.deepcopy(job)
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -71,17 +71,17 @@ task_description_schema = Schema({
# custom scopes for this task; any scopes required for the worker will be
# added automatically. The following parameters will be substituted in each
# scope:
# {level} -- the scm level of this push
Optional('scopes'): [basestring],
# Tags
- Optional('tags'): {basestring: object},
+ Optional('tags'): {basestring: basestring},
# custom "task.extra" content
Optional('extra'): {basestring: object},
# treeherder-related information; see
# https://schemas.taskcluster.net/taskcluster-treeherder/v1/task-treeherder-config.json
# If not specified, no treeherder extra information or routes will be
# added to the task