From cb5db1733a728a8455b0720f5fd3b573d613db7d Mon Sep 17 00:00:00 2001 From: Dexter Yan Date: Wed, 1 May 2024 09:02:45 +1200 Subject: [PATCH] feat(analyzer): make sure ReplicaSetStatus has valid result (#1538) * feat(analyzer): make sure ReplicaSetStatus has valid result --------- Co-authored-by: Gerard Nguyen --- pkg/analyze/replicaset_status.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/analyze/replicaset_status.go b/pkg/analyze/replicaset_status.go index d4bc2758e..632cedc1a 100644 --- a/pkg/analyze/replicaset_status.go +++ b/pkg/analyze/replicaset_status.go @@ -101,6 +101,10 @@ func analyzeOneReplicaSetStatus(analyzer *troubleshootv1beta2.ReplicaSetStatus, } } + if result == nil { + return nil, nil + } + return []*AnalyzeResult{result}, nil }