Skip to content

Commit fa14616

Browse files
Log non-existentent analyzers instead of adding to analyzer results (#1593)
log to debug non-existent analyzes instead of adding to analyzers results
1 parent d83d8eb commit fa14616

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

pkg/analyze/analyzer.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,8 @@ func Analyze(
119119

120120
analyzerInst := getAnalyzer(analyzer)
121121
if analyzerInst == nil {
122-
return []*AnalyzeResult{{
123-
IsFail: true,
124-
Title: "nonexistent analyzer",
125-
Message: "Analyzer not found",
126-
}}, nil
122+
klog.Info("Non-existent analyzer found in the spec. Please double-check the spelling and indentation of the analyzers in the spec.")
123+
return nil, nil
127124
}
128125

129126
_, span := otel.Tracer(constants.LIB_TRACER_NAME).Start(ctx, analyzerInst.Title())

sample-troubleshoot.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: troubleshoot.sh/v1beta2
2-
kind: Collector
2+
kind: SupportBundle
33
metadata:
44
name: my-application-name
55
spec:

0 commit comments

Comments
 (0)