Skip to content

Commit

Permalink
Deduplicate task dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Nov 22, 2019
1 parent 203a06f commit 83921db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion etc/taskcluster/decisionlib.py
Expand Up @@ -221,9 +221,14 @@ def create(self):
assert CONFIG.decision_task_id
assert CONFIG.task_owner
assert CONFIG.task_source

def dedup(xs):
seen = set()
return [x for x in xs if not (x in seen or seen.add(x))]

queue_payload = {
"taskGroupId": CONFIG.decision_task_id,
"dependencies": [CONFIG.decision_task_id] + self.dependencies,
"dependencies": dedup([CONFIG.decision_task_id] + self.dependencies),
"schedulerId": self.scheduler_id,
"provisionerId": self.provisioner_id,
"workerType": self.worker_type,
Expand Down

0 comments on commit 83921db

Please sign in to comment.