{"record":{"id":"13ccde008f390a6b","repo":"GoogleContainerTools/skaffold","slug":"verify-test-failed-13ccde","errorCode":null,"errorMessage":"verify test failed","messagePattern":"verify test failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/verify/k8sjob/verify.go","lineNumber":308,"sourceCode":"\t\t\t\t}\n\n\t\t\t\tpodErr = fmt.Errorf(\n\t\t\t\t\t\"%q running job %q errored during run: reason=%q, message=%q\",\n\t\t\t\t\ttc.Name, job.Name, failReason, failMessage,\n\t\t\t\t)\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tif err := k8sjobutil.CheckIfPullImgErr(pod, job.Name); err != nil {\n\t\t\t\tv.logger.CancelJobLogger(job.Name)\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tif podErr != nil {\n\t\teventV2.VerifyFailed(tc.Name, podErr)\n\t\treturn errors.Wrap(podErr, \"verify test failed\")\n\t}\n\teventV2.VerifySucceeded(tc.Name)\n\treturn nil\n}\n\n// Cleanup deletes what was verified by calling Verify.\nfunc (v *Verifier) Cleanup(ctx context.Context, out io.Writer, dryRun bool) error {\n\tinstrumentation.AddAttributesToCurrentSpanFromContext(ctx, map[string]string{\n\t\t\"VerifierType\": \"kubernetesCluster\",\n\t})\n\n\tclientset, err := kubernetesclient.Client(v.kubectl.KubeContext)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"getting Kubernetes client: %w\", err)\n\t}\n\n\tfor _, job := range v.tracker.DeployedJobs() {\n\t\t// assumes the job namespace is set and not \"\" which is the case as createJob","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/verify/k8sjob/verify.go#L290-L326","documentation":"The pod watch loop observed a failure for the verify job's pod (podErr set from pod status/termination), so the verify test case is marked failed with 'verify test failed' wrapping the pod error. This means the job's container itself reported failure, not a cluster/API problem.","triggerScenarios":"During the w.ResultChan() loop, a pod event indicates the verify container failed (non-zero exit code, terminated with failure reason), setting podErr; after the watch ends, watchJob wraps and returns it.","commonSituations":"Test command in the verify pod exits non-zero; pod OOMKilled; image pull backoff for the verify image; test fails due to missing in-cluster service dependencies.","solutions":["Get pod logs: `kubectl logs job/<job-name> -n <ns>` to see the actual test failure","Check pod events/status (`kubectl describe pod`) for OOMKilled or ImagePullBackOff","Fix the failing test or its in-cluster dependencies (env vars, service endpoints)","Ensure the verify image is reachable by the cluster (push to a registry the cluster can pull from)"],"exampleFix":"// before: verify image only local, cluster can't pull\ncontainer:\n  image: local-only-image\n// after: push and reference registry image\ncontainer:\n  image: registry.example.com/verify-image:tag","handlingStrategy":"try-catch","validationCode":"// Ensure verify image is pullable from the cluster\nif err := exec.Command(\"kubectl\", \"run\", \"pull-check\", \"--image\", verifyImage, \"--restart=Never\", \"--\", \"true\").Run(); err != nil {\n    return fmt.Errorf(\"cluster cannot pull verify image %s\", verifyImage)\n}","typeGuard":null,"tryCatchPattern":"if err := verifier.Verify(ctx, out, tc); err != nil {\n    if strings.Contains(err.Error(), \"verify test failed\") {\n        logs, _ := exec.Command(\"kubectl\", \"logs\", \"job/\"+jobName, \"-n\", ns).CombinedOutput()\n        return fmt.Errorf(\"verify failed, pod logs: %s: %w\", logs, err)\n    }\n    return err\n}","preventionTips":["Push verify images to a registry reachable by the cluster","Inspect pod describe output for OOMKilled/ImagePullBackOff before debugging the test","Fix failing test assertions and in-cluster dependencies before rerunning verify"],"tags":["kubernetes","verify","pod-failure","test-failure"],"backgroundTag":"verify-test-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}