Merge pull request #129251 from alingse/patch-1

fix check errRaw != nil but return a nil value error err
This commit is contained in:
Kubernetes Prow Robot 2025-02-26 18:48:30 -08:00 committed by GitHub
commit f06716edb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -325,7 +325,7 @@ func GetKubeletHeapStats(ctx context.Context, c clientset.Interface, nodeName st
}
raw, errRaw := client.Raw()
if errRaw != nil {
return "", err
return "", errRaw
}
kubeletstatsv1alpha1 := string(raw)
// Only dumping the runtime.MemStats numbers to avoid polluting the log.