From 01f3c85bdb67d08910506ac5d10791850f2b524f Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Tue, 24 Sep 2019 14:34:19 +0200 Subject: [PATCH] Bug 1580778 - Fix duplicated scopes (#5515) --- taskcluster/fenix_taskgraph/job.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/taskcluster/fenix_taskgraph/job.py b/taskcluster/fenix_taskgraph/job.py index 80abc9aa2..3b47ed597 100644 --- a/taskcluster/fenix_taskgraph/job.py +++ b/taskcluster/fenix_taskgraph/job.py @@ -46,7 +46,9 @@ def configure_gradlew(config, job, taskdesc): run["command"] = _extract_command(run) secrets = run.pop("secrets", []) scopes = taskdesc.setdefault("scopes", []) - scopes.extend(["secrets:get:{}".format(secret["name"]) for secret in secrets]) + new_secret_scopes = ["secrets:get:{}".format(secret["name"]) for secret in secrets] + new_secret_scopes = list(set(new_secret_scopes)) # Scopes must not have any duplicates + scopes.extend(new_secret_scopes) run["cwd"] = "{checkout}" run["using"] = "run-task"