Log a warning if uncategorized_fails finds nothing

Chances are probably 0 that we won't have failures
or that we'd have 100% categorization rates, which
probably mean if we don't get any failures the
default ALL_FAILS_QUERY is broken, which can easily
happen:

  I208675c2258b6c635925c7b9ea9fae5afd000565

This logs a warning if a group yields no failures
based on the default ALL_FAILS_QUERY.

Change-Id: Ib2c12b1fc276389297cf4ac15775e6b2da828fdd
This commit is contained in:
Matt Riedemann 2019-01-17 17:15:19 -05:00
parent cdf6ee031e
commit a8694f804a
1 changed files with 6 additions and 0 deletions

View File

@ -363,6 +363,12 @@ def main():
LOG.info("Processing failures for group: %s", group)
fails = all_gate_fails[group]
if not fails:
# It would be pretty spectacular if we had no failures so if we're
# using the default all failures query, there could be a problem
# with the query, so log a hint.
if opts.all_fails_query == er_config.ALL_FAILS_QUERY:
LOG.warning('No failures found in group "%s". The default '
'ALL_FAILS_QUERY might be broken.', group)
continue
data = collect_metrics(classifier, fails, config=config)
engine = setup_template_engine(opts.templatedir, group=group)