mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 18:29:53 +00:00
Log when analysers fail to match any outcome conditions (#1597)
Signed-off-by: Evans Mungai <evans@replicated.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user