in taskcluster/glean_taskgraph/loader/multi_dep.py [0:0]
def loader(kind, path, config, params, loaded_tasks):
"""
Load tasks based on the jobs dependant kinds, designed for use as
multiple-dependent needs.
Required ``group-by-fn`` is used to define how we coalesce the
multiple deps together to pass to transforms, e.g. all kinds specified get
collapsed by platform with `platform`
Optional ``primary-dependency`` (ordered list or string) is used to determine
which upstream kind to inherit attrs from. See ``get_primary_dep``.
Optional ``task-template`` kind configuration value, if specified, will be used to
pass configuration down to the specified transforms used.
"""
task_template = config.get('task-template')
for dep_tasks in group_tasks(config, loaded_tasks):
kinds = [dep.kind for dep in dep_tasks]
assert_unique_members(
kinds, error_msg="multi_dep.py should have filtered down to one task per kind"
)
dep_tasks_per_kind = {dep.kind: dep for dep in dep_tasks}
task = {'dependent-tasks': dep_tasks_per_kind,
'primary-dependency': get_primary_dep(config, dep_tasks_per_kind)}
if task_template:
task.update(copy.deepcopy(task_template))
yield task