Skip to content

Commit ff31f5a

Browse files
authored
Log when analysers fail to match any outcome conditions (#1597)
Signed-off-by: Evans Mungai <[email protected]>
1 parent 8ab2b5e commit ff31f5a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/analyze/analyzer.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ func HostAnalyze(
8989
if err != nil {
9090
return NewAnalyzeResultError(analyzer, errors.Wrap(err, "analyze"))
9191
}
92+
93+
if len(result) == 0 {
94+
klog.Errorf("no outcome matched for %q host analyzer", analyzer.Title())
95+
}
96+
9297
return result
9398
}
9499

@@ -148,6 +153,10 @@ func Analyze(
148153
results = []*AnalyzeResult{}
149154
}
150155

156+
if len(results) == 0 {
157+
klog.Errorf("no outcome matched for %q analyzer", analyzerInst.Title())
158+
}
159+
151160
return results, nil
152161
}
153162

0 commit comments

Comments
 (0)