{"record":{"id":"b1b9b930649226b6","repo":"argoproj/argo-workflows","slug":"failed-to-get-the-entrypoint-node","errorCode":null,"errorMessage":"failed to get the entrypoint node","messagePattern":"failed to get the entrypoint node","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"cmd/argo/commands/common/get.go","lineNumber":166,"sourceCode":"\t\tw := tabwriter.NewWriter(writerBuffer, 0, 0, 2, ' ', 0)\n\t\tout += \"\\n\"\n\t\t// apply a dummy FgDefault format to align tab writer with the rest of the columns\n\t\tswitch getArgs.Output.String() {\n\t\tcase \"wide\":\n\t\t\t_, _ = fmt.Fprintf(w, \"%s\\tTEMPLATE\\tPODNAME\\tDURATION\\tARTIFACTS\\tMESSAGE\\tRESOURCESDURATION\\tNODENAME\\n\", ansiFormat(\"STEP\", FgDefault))\n\t\tcase \"short\":\n\t\t\t_, _ = fmt.Fprintf(w, \"%s\\tTEMPLATE\\tPODNAME\\tDURATION\\tMESSAGE\\tNODENAME\\n\", ansiFormat(\"STEP\", FgDefault))\n\t\tdefault:\n\t\t\t_, _ = fmt.Fprintf(w, \"%s\\tTEMPLATE\\tPODNAME\\tDURATION\\tMESSAGE\\n\", ansiFormat(\"STEP\", FgDefault))\n\t\t}\n\n\t\t// Convert Nodes to Render Trees\n\t\troots := convertToRenderTrees(wf)\n\n\t\t// Print main and onExit Trees\n\t\tmainRoot := roots[wf.Name]\n\t\tif mainRoot == nil {\n\t\t\tpanic(\"failed to get the entrypoint node\")\n\t\t}\n\t\tmainRoot.renderNodes(w, wf, 0, \" \", \" \", getArgs)\n\n\t\tonExitID := wf.NodeID(wf.Name + \".\" + onExitSuffix)\n\t\tif onExitRoot, ok := roots[onExitID]; ok {\n\t\t\t_, _ = fmt.Fprintf(w, \"\\t\\t\\t\\t\\t\\n\")\n\t\t\tonExitRoot.renderNodes(w, wf, 0, \" \", \" \", getArgs)\n\t\t}\n\t\t_ = w.Flush()\n\t\tif getArgs.Output.String() == \"short\" {\n\t\t\tout = writerBuffer.String()\n\t\t} else {\n\t\t\tout += writerBuffer.String()\n\t\t}\n\t}\n\twriterBuffer := new(bytes.Buffer)\n\tout += writerBuffer.String()\n\treturn out","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/common/get.go#L148-L184","documentation":"`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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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).","Wait until the workflow has at least one node before running `argo get`, or use `argo wait`/`--output` variants that tolerate empty status.","Upgrade the argo CLI — newer releases return an error/empty tree instead of panicking on rootless workflows.","If the workflow is Pending forever, resolve the scheduler condition (quota, node resources, RBAC) so the entrypoint node is created."],"exampleFix":"// before\nargo submit wf.yaml && argo get wf   # nodes not yet created -> panic\n\n// after\nargo submit -w wf.yaml\nargo wait wf\nargo get wf","handlingStrategy":"fallback","validationCode":"// Before calling argo get, ensure the workflow has nodes\nstatus=$(kubectl get wf \"$WF\" -o jsonpath='{.status.phase}')\nnodes=$(kubectl get wf \"$WF\" -o jsonpath='{.status.nodes}' | wc -c)\nif [ \"$nodes\" -le 2 ]; then echo \"workflow $WF has no nodes yet (phase=$status)\"; fi","typeGuard":null,"tryCatchPattern":"// argo get panics (exit code 2) on rootless workflows — detect and fall back to raw status\nif ! argo get \"$WF\" 2>err.log; then\n  if grep -q \"failed to get the entrypoint node\" err.log; then\n    kubectl get wf \"$WF\" -o yaml   # fallback: inspect raw status\n  fi\nfi","preventionTips":["Never call `argo get` immediately after submit without `argo wait` or a phase check.","Use `argo submit -w` (wait) so the CLI blocks until nodes exist.","Pin a recent argo CLI version where rootless workflows don't panic.","In scripts, treat `argo get` failures as 'not started yet' and retry with backoff."],"tags":["argo-workflows","cli","panic","workflow-status"],"backgroundTag":"missing-entrypoint-node","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"}