Bug 1342264 - Fix case of backfilling with no previous builds draft
authorBrian Stack <bstack@mozilla.com>
Thu, 23 Feb 2017 15:13:07 -0800
changeset 488884 42559c58a9627ab3f908436764fa232324aa8a20
parent 488863 5069348353f8fc1121e632e3208da33900627214
child 546865 e475a3e7d422780a5659cd543d287ba2077676eb
push id46673
push userbstack@mozilla.com
push dateThu, 23 Feb 2017 23:13:45 +0000
bugs1342264
milestone54.0a1
Bug 1342264 - Fix case of backfilling with no previous builds MozReview-Commit-ID: FXF7EW8Nygl
taskcluster/taskgraph/action.py
--- a/taskcluster/taskgraph/action.py
+++ b/taskcluster/taskgraph/action.py
@@ -130,17 +130,17 @@ def load_decisions(s, project, resultset
         while True:
             params = {"push_id": resultset, "count": jobs_per_call, "offset": offset}
             results = s.get(url=project_url, params=params).json()["results"]
             unfiltered += results
             if (len(results) < jobs_per_call):
                 break
             offset += jobs_per_call
         filtered = [j for j in unfiltered if all([j[k] == filters[k] for k in filters])]
-        if all([j["result"] == "success" for j in filtered]):
+        if filtered and all([j["result"] == "success" for j in filtered]):
             logger.info("Push found with all green jobs for this type. Continuing.")
             break
         decisions += [t for t in unfiltered if t["job_type_name"] == "Gecko Decision Task"]
 
     for decision in decisions:
         params = {"job_guid": decision["job_guid"]}
         details = s.get(url=decision_url, params=params).json()["results"]
         inspect = [detail["url"] for detail in details if detail["value"] == "Inspect Task"][0]