Skip to content

Commit

Permalink
Rename 'job' -> 'task' in Taskgraph's multi_dep loader
Browse files Browse the repository at this point in the history
This fixes a couple places I neglected to convert when upgrading
Taskgraph.

Issue: #2388
  • Loading branch information
ahal authored and chutten committed Mar 1, 2023
1 parent 77997c8 commit e03d98e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion taskcluster/ci/beetmover/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind-dependencies:
primary-dependency: module-build
group-by: component

job-template:
task-template:
run-on-tasks-for: [github-release]
description: 'Publish release module {}'
worker-type: beetmover
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/signing/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kind-dependencies:
primary-dependency: module-build
group-by: component

job-template:
task-template:
run-on-tasks-for: [github-release]
description: 'Sign release module {}'
worker-type: signing
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/glean_taskgraph/loader/build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


def loader(kind, path, config, params, loaded_tasks):
config['jobs'] = jobs = {
config['tasks'] = {
component['name']: {
'attributes': {
'buildconfig': component
Expand Down
12 changes: 6 additions & 6 deletions taskcluster/glean_taskgraph/loader/multi_dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def loader(kind, path, config, params, loaded_tasks):
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 ``job-template`` kind configuration value, if specified, will be used to
Optional ``task-template`` kind configuration value, if specified, will be used to
pass configuration down to the specified transforms used.
"""
job_template = config.get('job-template')
task_template = config.get('task-template')

for dep_tasks in group_tasks(config, loaded_tasks):
kinds = [dep.kind for dep in dep_tasks]
Expand All @@ -45,12 +45,12 @@ def loader(kind, path, config, params, loaded_tasks):

dep_tasks_per_kind = {dep.kind: dep for dep in dep_tasks}

job = {'dependent-tasks': dep_tasks_per_kind,
task = {'dependent-tasks': dep_tasks_per_kind,
'primary-dependency': get_primary_dep(config, dep_tasks_per_kind)}
if job_template:
job.update(copy.deepcopy(job_template))
if task_template:
task.update(copy.deepcopy(task_template))

yield job
yield task


def assert_unique_members(kinds, error_msg=None):
Expand Down

0 comments on commit e03d98e

Please sign in to comment.