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:
parent
e51b35ff24
commit
314d578653
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user