{"record":{"id":"c4edc50479e2fcc6","repo":"tailscale/tailscale","slug":"watch-error-v","errorCode":null,"errorMessage":"watch error: %v","messagePattern":"watch error: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/k8s-operator/e2e/setup.go","lineNumber":823,"sourceCode":"\tfor {\n\t\tselect {\n\t\tcase event, ok := <-w.ResultChan():\n\t\t\tif !ok {\n\t\t\t\treturn \"\", fmt.Errorf(\"watcher channel closed\")\n\t\t\t}\n\n\t\t\tswitch event.Type {\n\t\t\tcase watch.Added, watch.Modified:\n\t\t\t\tif pod, ok := event.Object.(*corev1.Pod); ok {\n\t\t\t\t\tfor _, condition := range pod.Status.Conditions {\n\t\t\t\t\t\tif condition.Type == corev1.PodReady && condition.Status == corev1.ConditionTrue {\n\t\t\t\t\t\t\tlogger.Infof(\"pod %s is ready\", pod.Name)\n\t\t\t\t\t\t\treturn pod.Name, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcase watch.Error:\n\t\t\t\treturn \"\", fmt.Errorf(\"watch error: %v\", event.Object)\n\t\t\t}\n\t\tcase <-ctx.Done():\n\t\t\treturn \"\", fmt.Errorf(\"timeout waiting for pod to be ready\")\n\t\t}\n\t}\n}\n\nfunc pebbleGet(ctx context.Context, port uint16, path string) ([]byte, error) {\n\tpebbleClient := &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tTLSClientConfig: &tls.Config{\n\t\t\t\tRootCAs: testCAs,\n\t\t\t},\n\t\t},\n\t\tTimeout: 10 * time.Second,\n\t}\n\treq, _ := http.NewRequestWithContext(ctx, \"GET\", fmt.Sprintf(\"https://localhost:%d%s\", port, path), nil)\n\tresp, err := pebbleClient.Do(req)","sourceCodeStart":805,"sourceCodeEnd":841,"githubUrl":"https://github.com/tailscale/tailscale/blob/cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042/cmd/k8s-operator/e2e/setup.go#L805-L841","documentation":"Error \"watch error: %v\" thrown in tailscale/tailscale.","triggerScenarios":"Thrown at cmd/k8s-operator/e2e/setup.go:823 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042","analyzedAt":"2026-08-15T19:58:31.583Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}