def all_fails(classifier):
    all_fails = {}
    query = ('filename:"console.html" '
             'AND message:"Finished: FAILURE" '
             'AND build_queue:"gate"')
    results = classifier.hits_by_query(query, size=30000)
    facets = er_results.FacetSet()
    facets.detect_facets(results, ["build_uuid"])
    for build in facets:
        for result in facets[build]:
            # not perfect, but basically an attempt to show the integrated
            # gate. Would be nice if there was a zuul attr for this in es.
            if re.search("(^openstack/|devstack|grenade)", result.project):
                all_fails["%s.%s" % (build, result.build_name)] = False
    return all_fails
Find all the fails in the integrated gate.
dataset/ETHPy150Open openstack-infra/elastic-recheck/elastic_recheck/cmd/check_success.py/all_fails