only query voting changes

Elastic recheck is about failures, all queries should only include
voting changes. We do this by explicitly adding voting:1 to all
queries that load in the query builder.

Change-Id: I4bd4827f72d85bf69bf501be2f5744e71de35a3c
This commit is contained in:
Sean Dague 2015-12-02 09:44:01 -05:00
parent e51b35ff24
commit 314d578653
4 changed files with 5 additions and 3 deletions

View File

@ -220,6 +220,8 @@ class Stream(object):
failed_tests = []
for line in event['comment'].split("\n"):
# this is needed to know if we care about categorizing
# these items. It's orthoginal to non voting ES searching.
if " (non-voting)" in line:
continue
m = re.search("- ([\w-]+)\s*(http://\S+)\s*:\s*FAILURE", line)

View File

@ -30,5 +30,6 @@ def load(directory='queries'):
bugnum = os.path.basename(fname).rstrip('.yaml')
query = yaml.load(open(fname).read())
query['bug'] = bugnum
query['query'] = "%s AND voting:1" % query['query'].rstrip()
data.append(query)
return data

View File

@ -29,7 +29,7 @@ class TestElasticRecheck(unit.UnitTestCase):
def test_hits_by_query(self):
c = er.Classifier("queries.yaml")
q = ('''message:"Cannot ''createImage''"'''
''' AND filename:"console.html"''')
''' AND filename:"console.html" AND voting:1''')
results = c.hits_by_query(q)
self.assertEqual(len(results), 20)
self.assertEqual(results.took, 46)

View File

@ -1,5 +1,4 @@
query: >-
message:"AssertionError: False is not true : Timed out waiting for 2003::1 to become reachable from" AND
tags:"console" AND
NOT build_queue:"periodic-qa" AND
voting:"1"
NOT build_queue:"periodic-qa"