diff options
Diffstat (limited to 'taskcluster/gecko_taskgraph/transforms/test/variant.py')
-rw-r--r-- | taskcluster/gecko_taskgraph/transforms/test/variant.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/taskcluster/gecko_taskgraph/transforms/test/variant.py b/taskcluster/gecko_taskgraph/transforms/test/variant.py index bda91b2f25..6ee6c429f0 100644 --- a/taskcluster/gecko_taskgraph/transforms/test/variant.py +++ b/taskcluster/gecko_taskgraph/transforms/test/variant.py @@ -78,6 +78,14 @@ def split_variants(config, tasks): remaining_variants.append(name) return remaining_variants + def replace_task_items(task_key, variant_key): + for item in variant_key: + if isinstance(variant_key[item], dict): + task_key[item] = replace_task_items(task_key[item], variant_key[item]) + else: + task_key[item] = variant_key[item] + return task_key + def apply_variant(variant, task): task["description"] = variant["description"].format(**task) @@ -94,7 +102,9 @@ def split_variants(config, tasks): task["variant-suffix"] += suffix # Replace and/or merge the configuration. - task.update(variant.get("replace", {})) + + # we only want to update the leaf node, the the entire top level dict + task = replace_task_items(task, variant.get("replace", {})) return merge(task, variant.get("merge", {})) expired_variants = find_expired_variants(TEST_VARIANTS) |