bug 1425924: improve bustage fix for trigger_action.py. r=rail THUNDERBIRD_52_5_2_BUILD1 THUNDERBIRD_52_5_2_RELEASE
authorBen Hearsum <bhearsum@mozilla.com>
Wed, 20 Dec 2017 15:09:34 -0500
changeset 8135 e41133e0a51d
parent 8134 f0f36f7f85f9
child 8136 99a8e5a049db
push id5975
push userbhearsum@mozilla.com
push dateWed, 20 Dec 2017 20:18:28 +0000
reviewersrail
bugs1425924
bug 1425924: improve bustage fix for trigger_action.py. r=rail
buildfarm/release/trigger_action.py
--- a/buildfarm/release/trigger_action.py
+++ b/buildfarm/release/trigger_action.py
@@ -105,22 +105,24 @@ def main():
 
     parameters = yaml.safe_load(params_yaml)
     project = parameters["project"]
     revision = parameters["head_rev"]
 
     if not decision_task_id:
         decision_task_id = find_decision_task_id(project, revision)
 
-    previous_graph_ids = set([decision_task_id])
+    previous_graph_ids = []
     if args.previous_graph_ids:
-        previous_graph_ids.update(args.previous_graph_ids.split(','))
+        previous_graph_ids.extend(args.previous_graph_ids.split(','))
+    if decision_task_id not in previous_graph_ids:
+        previous_graph_ids.insert(0, decision_task_id)
     action_task_input.update({
         "release_promotion_flavor": args.action_flavor,
-        "previous_graph_ids": list(previous_graph_ids) + [args.action_task_id],
+        "previous_graph_ids": previous_graph_ids + [args.action_task_id],
     })
     action_task_id, action_task = generate_action_task(
             project=project,
             revision=revision,
             action_task_input=action_task_input,
     )
 
     log.info("Submitting action task %s for %s", action_task_id, args.action_flavor)