{"record":{"id":"27ba6c1b59a197af","repo":"argoproj/argo-workflows","slug":"failed-to-get-pod-from-informer-store-w","errorCode":null,"errorMessage":"failed to get pod from informer store: %w","messagePattern":"failed to get pod from informer store: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/controller/agent.go","lineNumber":123,"sourceCode":"\t\t\tMountPath: \"/etc/ssl/certs/ca-certificates/\",\n\t\t\tReadOnly:  true,\n\t\t}\n\n\t\treturn certVolume, certVolumeMount, nil\n\t}\n\treturn nil, nil, nil\n}\n\nfunc (woc *wfOperationCtx) createAgentPod(ctx context.Context) (*apiv1.Pod, error) {\n\tif woc.controller.Config.DisableAgentPodCreation {\n\t\treturn nil, nil\n\t}\n\tpodName := woc.getAgentPodName()\n\tctx, log := woc.log.WithField(\"podName\", podName).InContext(ctx)\n\n\tpod, err := woc.controller.PodController.GetPod(woc.wf.Namespace, podName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get pod from informer store: %w\", err)\n\t}\n\tif pod != nil {\n\t\treturn pod, nil\n\t}\n\n\tcertVolume, certVolumeMount, err := woc.getCertVolumeMount(ctx, common.CACertificatesVolumeMountName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tpluginSidecars, pluginVolumes, err := woc.getExecutorPlugins(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tenvVars := []apiv1.EnvVar{\n\t\t{Name: common.EnvVarWorkflowName, Value: woc.wf.Name},\n\t\t{Name: common.EnvVarWorkflowUID, Value: string(woc.wf.UID)},","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/controller/agent.go#L105-L141","documentation":"createAgentPod looks up the agent pod for the workflow from the controller's pod informer store (not a live API call). If the informer store lookup fails, the error is wrapped as 'failed to get pod from informer store: %w'. Note a clean 'not found' result (nil pod, nil err) is expected and proceeds to pod creation; this error means the lookup itself failed.","triggerScenarios":"PodController.GetPod(namespace, podName) returns an error during reconcileAgentPod — typically informer cache sync issues, store closed during controller shutdown, or an internal cache error — while creating/reconciling the agent pod.","commonSituations":"Controller restarting while workflows are being reconciled; informer not yet synced after controller startup; heavy load causing cache resync problems; unit/integration tests exercising createAgentPod with an unprimed informer.","solutions":["Wait for the controller to resync and the workflow to be re-reconciled (reconciliation is periodic; this is often transient)","Check controller logs around startup for informer sync failures","Restart the workflow-controller if the informer store remains unhealthy","Ensure only one controller instance is reconciling the namespace (leader election healthy)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"pod, err := podController.GetPod(ns, name)\nif err != nil {\n    // informer store hiccup: requeue and retry on next reconcile\n    return nil, fmt.Errorf(\"...: %w\", err)\n}","preventionTips":["Ensure informers are synced before reconciling (HasSynced checks)","Run a single leader-elected controller per namespace","Restart controller if cache stays unsynced; watch startup logs"],"tags":["kubernetes","informer","cache","argo-workflows"],"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"}