From 14bfee5646d3dda77b14c2d14ead3bd572074484 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Tue, 1 Apr 2014 21:21:44 -0700 Subject: [PATCH] Don't include recheck instructions when unclassified failures If there is an unclassified failure in the check queue, we want to make it clear to the user so they will investigate the error as its most likely a valid failure. Also don't include recheck instructions when unclassified failure as they shouldn't be running a recheck if there is an unclassified failure. With us now classifying many failures from non-voting jobs, it is common to see classified failures and no mention of the job that legitimately failed. Partial revert of I52044afb4f3a1bf3f22ba4c0e8d38d76271ffc00 Change-Id: I6b471b9ab9c7f36eeed93993ea086bbc9daa56b0 --- elastic_recheck/elasticRecheck.py | 8 +------- elastic_recheck/tests/unit/test_stream.py | 5 +++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/elastic_recheck/elasticRecheck.py b/elastic_recheck/elasticRecheck.py index d7ded447..4d36fb6f 100644 --- a/elastic_recheck/elasticRecheck.py +++ b/elastic_recheck/elasticRecheck.py @@ -134,9 +134,7 @@ class FailEvent(object): bug_map = {} for job in self.failed_jobs: if len(job.bugs) is 0: - # we only care about fails with missing bugs in the gate - if self.queue() == "gate": - bug_map[job.name] = None + bug_map[job.name] = None else: bug_map[job.name] = ' '.join(self.bug_urls(job.bugs)) bug_list = [] @@ -150,10 +148,6 @@ class FailEvent(object): def is_fully_classified(self): if self.get_all_bugs() is None: return True - # we consider anything that's not in the gate queue - # fully classified, because errors are expected - if self.queue() != "gate": - return True for job in self.failed_jobs: if len(job.bugs) is 0: return False diff --git a/elastic_recheck/tests/unit/test_stream.py b/elastic_recheck/tests/unit/test_stream.py index f0a8dbcc..0dff5072 100644 --- a/elastic_recheck/tests/unit/test_stream.py +++ b/elastic_recheck/tests/unit/test_stream.py @@ -178,10 +178,11 @@ class TestStream(tests.TestCase): self.assertEqual(event.bug_urls(), ['https://bugs.launchpad.net/bugs/123456']) self.assertEqual(event.bug_urls_map(), - ['gate-keystone-python26: ' + ['gate-keystone-python27: unrecognized error', + 'gate-keystone-python26: ' 'https://bugs.launchpad.net/bugs/123456']) self.assertEqual(sorted(event.failed_job_names()), ['gate-keystone-python26', 'gate-keystone-python27']) self.assertEqual(event.get_all_bugs(), ['123456']) - self.assertTrue(event.is_fully_classified()) + self.assertFalse(event.is_fully_classified())