From 08f383c44f613893780efd65cc9c0d7124422d1b Mon Sep 17 00:00:00 2001 From: Gerard Nguyen Date: Mon, 2 Dec 2024 17:25:25 +1100 Subject: [PATCH] fix empty outcome --- pkg/analyze/cluster_container_statuses.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/analyze/cluster_container_statuses.go b/pkg/analyze/cluster_container_statuses.go index 7f3010b3e..8dd96978c 100644 --- a/pkg/analyze/cluster_container_statuses.go +++ b/pkg/analyze/cluster_container_statuses.go @@ -160,6 +160,10 @@ func (a *AnalyzeClusterContainerStatuses) analyzeContainerStatuses(podContainers // empty when indicates final case, let's return the result if when == "" { + // return collected results if any + if len(results) > 0 { + return results, nil + } return []*AnalyzeResult{&r}, nil }