Skip to content

Commit

Permalink
post empty lists for insightComponents (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
zreigz authored Dec 20, 2024
1 parent 387f38b commit 1ea16be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/ping/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 1ea16be

Please sign in to comment.