{"record":{"id":"5d12cb35df646caa","repo":"argoproj/argo-workflows","slug":"can-t-find-podinfo-for-podname-q","errorCode":null,"errorMessage":"can't find podInfo for podName %q","messagePattern":"can't find podInfo for podName %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/controller/artifact_gc.go","lineNumber":220,"sourceCode":"\t\ttasks := make([]*wfv1.WorkflowArtifactGCTask, 0)\n\n\t\tfor templateName, artifacts := range templatesToArtList {\n\t\t\ttemplate := templatesByName[templateName]\n\t\t\twoc.addTemplateArtifactsToTasks(ctx, podName, &tasks, template, artifacts)\n\t\t}\n\n\t\tif len(tasks) > 0 {\n\t\t\t// create the K8s WorkflowArtifactGCTask objects\n\t\t\tfor i, task := range tasks {\n\t\t\t\ttasks[i], err = woc.createWorkflowArtifactGCTask(ctx, task)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\t\t\t// create the pod\n\t\t\tpodAccessInfo, found := podNames[podName]\n\t\t\tif !found {\n\t\t\t\treturn fmt.Errorf(\"can't find podInfo for podName %q\", podName)\n\t\t\t}\n\n\t\t\t_, err := woc.createArtifactGCPod(ctx, strategy, tasks, podAccessInfo, podName, templatesToArtList, templatesByName)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\ntype podInfo struct {\n\tserviceAccount string\n\tpodMetadata    wfv1.Metadata\n\tpodSpecPatch   string\n}\n","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/controller/artifact_gc.go#L202-L238","documentation":"processArtifactGCStrategy builds two maps in lockstep: podNames (pod name -> podInfo with service account/metadata) and groupedByPod (pod name -> artifacts). Before creating each GC pod it re-reads podNames[podName]; if absent, internal bookkeeping is inconsistent. This defensive error at workflow/controller/artifact_gc.go:220 should be unreachable in normal operation and usually indicates a code bug or concurrent map corruption.","triggerScenarios":"A podName key exists in groupedByPod but not in podNames when iterating groupedByPod to create GC pods. Since every groupedByPod entry is inserted alongside a podNames entry in the same loop, this fires only if maps diverge — e.g. custom code modifications, or panic/interruption between insertions.","commonSituations":"Custom forks/patches of artifact_gc.go that populate groupedByPod without populating podNames; upstream bug reports where map iteration order or hash collisions with fnv32 pod-name hashing are suspected.","solutions":["Verify you are running an unmodified upstream controller binary; rebuild from source if artifact_gc.go was patched.","Check controller logs for the preceding artifact search results to identify which podName is missing; compare against the workflow's artifact list.","File a bug with Argo Workflows including the controller version and workflow spec — this is an internal invariant violation.","Work around by setting spec.artifactGC.forceFinalizerRemoval: true and deleting artifacts manually, then retrying the workflow deletion."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"can't find podInfo for podName\") { /* internal invariant violation: report bug, use forceFinalizerRemoval workaround */ }","preventionTips":["Run unmodified upstream workflow-controller images.","Keep controller version current — invariant bugs are fixed upstream.","When reported, capture debug logs and workflow YAML for the bug report."],"tags":["kubernetes","artifact-gc","internal-state","workflow-controller"],"backgroundTag":"internal-invariant-violation","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"}