Bug 1342264 - Fix case of backfilling with no previous builds
MozReview-Commit-ID: FXF7EW8Nygl
--- 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]