Merge pull request #128484 from carlory/improve-error

improve error message format for WaitForPodSuccessInNamespaceTimeout
This commit is contained in:
Kubernetes Prow Robot 2024-11-03 02:19:27 +00:00 committed by GitHub
commit 6cb5ea56cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -475,7 +475,7 @@ func WaitForPodSuccessInNamespaceTimeout(ctx context.Context, c clientset.Interf
ginkgo.By("Saw pod success")
return true, nil
case v1.PodFailed:
return true, gomega.StopTrying(fmt.Sprintf("pod %q failed with status: %+v", podName, pod.Status))
return true, gomega.StopTrying(fmt.Sprintf("pod %q failed with status: \n%s", podName, format.Object(pod.Status, 1)))
default:
return false, nil
}