{"record":{"id":"3af2b0dfb5a3bf34","repo":"argoproj/argo-workflows","slug":"failed-to-get-retry-strategy-w","errorCode":null,"errorMessage":"failed to get retry strategy: %w","messagePattern":"failed to get retry strategy: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argoexec/commands/emissary.go","lineNumber":225,"sourceCode":"\t}\n\n\tname, err = exec.LookPath(name)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to find name in PATH: %w\", err)\n\t}\n\n\tif os.Getenv(\"ARGO_DEBUG_PAUSE_BEFORE\") == \"true\" {\n\t\t// User can create the file: /ctr/NAME_OF_THE_CONTAINER/before\n\t\t// in order to break out of the wait and release the container from\n\t\t// the debugging state.\n\t\tif waitErr := file.WaitForCreate(ctx, varRunArgo+\"/ctr/\"+containerName+\"/before\"); waitErr != nil {\n\t\t\treturn fmt.Errorf(\"failed waiting for debug-pause-before marker: %w\", waitErr)\n\t\t}\n\t}\n\n\tbackoff, err := template.GetRetryStrategy()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get retry strategy: %w\", err)\n\t}\n\n\tcmdErr := retry.OnError(backoff, func(error) bool { return true }, func() error {\n\t\tcommand, closer, err := startCommand(ctx, name, args, template, containerName, includeScriptOutput)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to start command: %w\", err)\n\t\t}\n\t\tdefer closer()\n\n\t\tforwardSignals(ctx, signals, command.Process.Pid, false)\n\t\tpid := command.Process.Pid\n\t\tinnerCtx, cancel := context.WithCancel(ctx)\n\t\tdefer cancel()\n\t\tstartFileSignalHandler(innerCtx, pid, containerName)\n\t\tfor _, sidecarName := range template.GetSidecarNames() {\n\t\t\tif sidecarName == containerName {\n\t\t\t\tem, err := emissary.New()\n\t\t\t\tif err != nil {","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argoexec/commands/emissary.go#L207-L243","documentation":"runEmissary parses the retry strategy from the workflow template (template.GetRetryStrategy) to build a retry.OnError backoff before executing the command. This error means the template's retryStrategy could not be decoded/validated — typically the embedded template JSON in /var/run/argo/template is malformed or carries an invalid retryStrategy (e.g. bad duration).","triggerScenarios":"template.GetRetryStrategy returns an error: the retryStrategy fields in the workflow template fail validation/unmarshaling (invalid duration format, wrong types), or the /var/run/argo/template blob passed to argoexec is corrupt/truncated.","commonSituations":"A workflow with retryStrategy whose duration/value is out of range or malformed; running an argoexec image whose API version mismatches the controller (template serialization changed); hand-edited or corrupted template ConfigMap/downward API content.","solutions":["Fix the workflow's retryStrategy fields (valid duration like \"30s\", positive limits) and resubmit","Ensure the argoexec image version matches the workflow-controller version","Check the content of /var/run/argo/template in the pod for corruption","If only default behavior is needed, remove retryStrategy from the template"],"exampleFix":"// before\nretryStrategy:\n  limit: \"abc\"\n// after\nretryStrategy:\n  limit: \"3\"\n  backoff:\n    duration: \"30s\"","handlingStrategy":"validation","validationCode":"// client-side lint before submit\nconst wf = yaml.parse(manifest);\nfor (const t of allTemplates(wf)) {\n  const rs = t.retryStrategy;\n  if (rs && rs.limit && !/^[0-9]+$/.test(String(rs.limit))) throw new Error(`retryStrategy.limit must be an integer: ${rs.limit}`);\n  if (rs && rs.backoff && rs.backoff.duration && isNaN(Date.parse('1970-01-01T00:00:' + rs.backoff.duration))) throw new Error('bad duration: ' + rs.backoff.duration);\n}","typeGuard":null,"tryCatchPattern":"try { await submit(wf) } catch (e) { if (/failed to get retry strategy/.test(e.message)) { runArgoLint(wf); } throw e }","preventionTips":["Run `argo lint` on every workflow manifest before submit (validate shares the same parsing)","Pin argoexec and controller to the same release version","Use canonical retryStrategy fields (integer limit, duration like \"30s\")","Never hand-edit the serialized template blob under /var/run/argo"],"tags":["argoexec","retry-strategy","template","validation"],"backgroundTag":"invalid-retry-strategy","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"}