From 1ea16be0fe4eabf049ab7bcc7dded5ad7dc0be67 Mon Sep 17 00:00:00 2001 From: Lukasz Zajaczkowski Date: Fri, 20 Dec 2024 11:39:28 +0100 Subject: [PATCH] post empty lists for insightComponents (#331) --- pkg/ping/build.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/ping/build.go b/pkg/ping/build.go index 15446b8c..543da012 100644 --- a/pkg/ping/build.go +++ b/pkg/ping/build.go @@ -17,10 +17,11 @@ func pingAttributes(info *version.Info, pods []string, minKubeletVersion *string Distro: lo.ToPtr(findDistro(append(pods, info.GitVersion))), KubeletVersion: minKubeletVersion, } - if scraper.GetAiInsightComponents().IsFresh() && scraper.GetAiInsightComponents().Len() > 0 { + if scraper.GetAiInsightComponents().IsFresh() { klog.Info("found ", scraper.GetAiInsightComponents().Len(), " fresh AI insight components") scraper.GetAiInsightComponents().SetFresh(false) + // send empty list when AiInsightComponents len equal 0 insightComponents := make([]*console.ClusterInsightComponentAttributes, 0) for _, value := range scraper.GetAiInsightComponents().GetItems() {