From a0c45756d1729a5063c6dec16ce9d7ab89d1b58d Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Tue, 28 Jun 2022 14:55:37 +0200 Subject: [PATCH] [fenix] Bug 1776830 - part 4: Let multi_dep tasks override primary dep attributes --- taskcluster/fenix_taskgraph/transforms/multi_dep.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/taskcluster/fenix_taskgraph/transforms/multi_dep.py b/taskcluster/fenix_taskgraph/transforms/multi_dep.py index 3b3783eea..7bd2828a8 100644 --- a/taskcluster/fenix_taskgraph/transforms/multi_dep.py +++ b/taskcluster/fenix_taskgraph/transforms/multi_dep.py @@ -22,10 +22,11 @@ def build_name_and_attributes(config, tasks): dep_key: dep.label for dep_key, dep in _get_all_deps(task).items() } primary_dep = task["primary-dependency"] - copy_of_attributes = primary_dep.attributes.copy() - task.setdefault("attributes", {}).update(copy_of_attributes) + attributes = primary_dep.attributes.copy() + attributes.update(task.get("attributes", {})) + task["attributes"] = attributes # run_on_tasks_for is set as an attribute later in the pipeline - task.setdefault("run-on-tasks-for", copy_of_attributes["run_on_tasks_for"]) + task.setdefault("run-on-tasks-for", attributes["run_on_tasks_for"]) task["name"] = _get_dependent_job_name_without_its_kind(primary_dep) yield task