Log when analysers fail to match any outcome conditions (#1597)

Signed-off-by: Evans Mungai <evans@replicated.com>
This commit is contained in:
Evans Mungai
2024-08-20 10:52:28 +01:00
committed by GitHub
parent 8ab2b5e247
commit ff31f5af0b

View File

@@ -89,6 +89,11 @@ func HostAnalyze(
if err != nil {
return NewAnalyzeResultError(analyzer, errors.Wrap(err, "analyze"))
}
if len(result) == 0 {
klog.Errorf("no outcome matched for %q host analyzer", analyzer.Title())
}
return result
}
@@ -148,6 +153,10 @@ func Analyze(
results = []*AnalyzeResult{}
}
if len(results) == 0 {
klog.Errorf("no outcome matched for %q analyzer", analyzerInst.Title())
}
return results, nil
}