argoproj/argo-workflows · error

can't find podInfo for podName %q

Error message

can't find podInfo for podName %q

What it means

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.

Source

Thrown at workflow/controller/artifact_gc.go:220

		tasks := make([]*wfv1.WorkflowArtifactGCTask, 0)

		for templateName, artifacts := range templatesToArtList {
			template := templatesByName[templateName]
			woc.addTemplateArtifactsToTasks(ctx, podName, &tasks, template, artifacts)
		}

		if len(tasks) > 0 {
			// create the K8s WorkflowArtifactGCTask objects
			for i, task := range tasks {
				tasks[i], err = woc.createWorkflowArtifactGCTask(ctx, task)
				if err != nil {
					return err
				}
			}
			// create the pod
			podAccessInfo, found := podNames[podName]
			if !found {
				return fmt.Errorf("can't find podInfo for podName %q", podName)
			}

			_, err := woc.createArtifactGCPod(ctx, strategy, tasks, podAccessInfo, podName, templatesToArtList, templatesByName)
			if err != nil {
				return err
			}
		}
	}

	return nil
}

type podInfo struct {
	serviceAccount string
	podMetadata    wfv1.Metadata
	podSpecPatch   string
}

View on GitHub (pinned to 35bff19146)

Solutions

  1. Verify you are running an unmodified upstream controller binary; rebuild from source if artifact_gc.go was patched.
  2. Check controller logs for the preceding artifact search results to identify which podName is missing; compare against the workflow's artifact list.
  3. File a bug with Argo Workflows including the controller version and workflow spec — this is an internal invariant violation.
  4. Work around by setting spec.artifactGC.forceFinalizerRemoval: true and deleting artifacts manually, then retrying the workflow deletion.
Defensive patterns

Strategy: try-catch

Try / catch

if strings.Contains(err.Error(), "can't find podInfo for podName") { /* internal invariant violation: report bug, use forceFinalizerRemoval workaround */ }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/5d12cb35df646caa. Report an issue: GitHub.