argoproj/argo-workflows · critical

failed to get the entrypoint node

Error message

failed to get the entrypoint node

What it means

`argo get`/`argo logs` render the workflow as a tree rooted at the node named after the workflow itself. When the workflow object has no such root node (usually because it never started, so Status.Nodes is empty, or the node map is missing the root entry), PrintWorkflowHelper panics with 'failed to get the entrypoint node'. This is a CLI panic, not a validation error, and aborts printing entirely.

Source

Thrown at cmd/argo/commands/common/get.go:166

		w := tabwriter.NewWriter(writerBuffer, 0, 0, 2, ' ', 0)
		out += "\n"
		// apply a dummy FgDefault format to align tab writer with the rest of the columns
		switch getArgs.Output.String() {
		case "wide":
			_, _ = fmt.Fprintf(w, "%s\tTEMPLATE\tPODNAME\tDURATION\tARTIFACTS\tMESSAGE\tRESOURCESDURATION\tNODENAME\n", ansiFormat("STEP", FgDefault))
		case "short":
			_, _ = fmt.Fprintf(w, "%s\tTEMPLATE\tPODNAME\tDURATION\tMESSAGE\tNODENAME\n", ansiFormat("STEP", FgDefault))
		default:
			_, _ = fmt.Fprintf(w, "%s\tTEMPLATE\tPODNAME\tDURATION\tMESSAGE\n", ansiFormat("STEP", FgDefault))
		}

		// Convert Nodes to Render Trees
		roots := convertToRenderTrees(wf)

		// Print main and onExit Trees
		mainRoot := roots[wf.Name]
		if mainRoot == nil {
			panic("failed to get the entrypoint node")
		}
		mainRoot.renderNodes(w, wf, 0, " ", " ", getArgs)

		onExitID := wf.NodeID(wf.Name + "." + onExitSuffix)
		if onExitRoot, ok := roots[onExitID]; ok {
			_, _ = fmt.Fprintf(w, "\t\t\t\t\t\n")
			onExitRoot.renderNodes(w, wf, 0, " ", " ", getArgs)
		}
		_ = w.Flush()
		if getArgs.Output.String() == "short" {
			out = writerBuffer.String()
		} else {
			out += writerBuffer.String()
		}
	}
	writerBuffer := new(bytes.Buffer)
	out += writerBuffer.String()
	return out

View on GitHub (pinned to 35bff19146)

Solutions

  1. Check `kubectl get wf <name> -o yaml` for Status.Nodes — if empty, the workflow has not started; inspect Status.Message/Conditions for why (e.g. Failed, Pending).
  2. Wait until the workflow has at least one node before running `argo get`, or use `argo wait`/`--output` variants that tolerate empty status.
  3. Upgrade the argo CLI — newer releases return an error/empty tree instead of panicking on rootless workflows.
  4. If the workflow is Pending forever, resolve the scheduler condition (quota, node resources, RBAC) so the entrypoint node is created.

Example fix

// before
argo submit wf.yaml && argo get wf   # nodes not yet created -> panic

// after
argo submit -w wf.yaml
argo wait wf
argo get wf
Defensive patterns

Strategy: fallback

Validate before calling

// Before calling argo get, ensure the workflow has nodes
status=$(kubectl get wf "$WF" -o jsonpath='{.status.phase}')
nodes=$(kubectl get wf "$WF" -o jsonpath='{.status.nodes}' | wc -c)
if [ "$nodes" -le 2 ]; then echo "workflow $WF has no nodes yet (phase=$status)"; fi

Try / catch

// argo get panics (exit code 2) on rootless workflows — detect and fall back to raw status
if ! argo get "$WF" 2>err.log; then
  if grep -q "failed to get the entrypoint node" err.log; then
    kubectl get wf "$WF" -o yaml   # fallback: inspect raw status
  fi
fi

Prevention

When it happens

Trigger: Running `argo get <wf>` on a workflow that was submitted but never scheduled (Status.Nodes empty); a workflow deleted mid-run whose node map lost the root; printing a workflow whose name-based node ID is absent from roots — including workflows pending due to unsatisfiable conditions.

Common situations: Workflow stuck in Pending with zero nodes (resource quota, imagePullBackOff before node creation); `argo get @latest` right after submit; archived workflow with truncated status; CI scripts calling `argo get` immediately after submission without waiting for the first node.

Related errors


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