{"record":{"id":"2f6a62b15d6dbc23","repo":"argoproj/argo-workflows","slug":"failed-to-get-pods-from-informer-w","errorCode":null,"errorMessage":"failed to get pods from informer: %w","messagePattern":"failed to get pods from informer: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"workflow/controller/artifact_gc.go","lineNumber":553,"sourceCode":"\t}\n\n\t_, err = woc.controller.kubeclientset.CoreV1().Pods(woc.wf.Namespace).Create(ctx, pod, metav1.CreateOptions{})\n\n\tif err != nil {\n\t\tif !apierr.IsAlreadyExists(err) {\n\t\t\treturn nil, fmt.Errorf(\"failed to create pod: %w\", err)\n\t\t}\n\t\twoc.log.WithField(\"name\", pod.Name).Warn(ctx, \"Artifact GC Pod already exists\")\n\t}\n\treturn pod, nil\n}\n\n// go through any GC pods that are already running and may have completed\nfunc (woc *wfOperationCtx) processArtifactGCCompletion(ctx context.Context) error {\n\t// check if any previous Artifact GC Pods completed\n\tpods, err := woc.controller.PodController.GetPodsByIndex(indexes.WorkflowIndex, woc.wf.GetNamespace()+\"/\"+woc.wf.GetName())\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get pods from informer: %w\", err)\n\t}\n\n\tfor _, obj := range pods {\n\t\tpod := obj.(*corev1.Pod)\n\t\tif pod.Labels[common.LabelKeyComponent] != artifactGCComponent { // make sure it's an Artifact GC Pod\n\t\t\tcontinue\n\t\t}\n\n\t\t// make sure we didn't already process this one\n\t\tif woc.wf.Status.ArtifactGCStatus.IsArtifactGCPodRecouped(pod.Name) {\n\t\t\t// already processed\n\t\t\tcontinue\n\t\t}\n\n\t\tphase := pod.Status.Phase\n\n\t\t// if Pod is done processing the results\n\t\tif phase == corev1.PodSucceeded || phase == corev1.PodFailed {","sourceCodeStart":535,"sourceCodeEnd":571,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/controller/artifact_gc.go#L535-L571","documentation":"processArtifactGCCompletion queries the controller's pod informer index (WorkflowIndex) for all pods of this workflow to find completed artifact GC pods. An error from GetPodsByIndex means the informer index lookup failed (not that no pods exist), wrapped at workflow/controller/artifact_gc.go:553.","triggerScenarios":"The pod informer's index for key namespace/name errors — typically empty/invalid key or an informer index that was never built/corrupted during controller startup or cache resync.","commonSituations":"Reconciliation racing controller startup before pod informer sync; workflow name/namespace producing an invalid index key (shouldn't happen normally); memory pressure or panics corrupting the informer store.","solutions":["No user action needed for transient failures — the workflow key is requeued and reconciled again on the next workqueue tick.","If persistent, restart the workflow-controller to rebuild informer indexes.","Check controller startup logs to confirm the pod informer and WorkflowIndex are registered and synced.","Upgrade Argo Workflows if your version has a known pod-indexer bug."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"failed to get pods from informer\") { /* transient: controller requeues automatically; restart if persistent */ }","preventionTips":["Monitor informer HasSynced/health in controller metrics.","Give the controller time to sync pod informers after startup before heavy reconcile load.","Restart the controller on persistent index errors."],"tags":["kubernetes","informer-cache","artifact-gc","workflow-controller"],"backgroundTag":"informer-cache-error","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}