{"record":{"id":"d7daeb18a1f250b5","repo":"argoproj/argo-workflows","slug":"cannot-set-output-parameter-s-because-it-does-n","errorCode":null,"errorMessage":"cannot set output parameter '%s' because it does not use valueFrom.raw or it was already set","messagePattern":"cannot set output parameter '(.+?)' because it does not use valueFrom\\.raw or it was already set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/util/util.go","lineNumber":689,"sourceCode":"\t\t\t\t\t}\n\n\t\t\t\t\t// Update message\n\t\t\t\t\tif values.Message != \"\" {\n\t\t\t\t\t\tnode.Message = values.Message\n\t\t\t\t\t\tnodeUpdated = true\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update output parameters\n\t\t\t\t\tif len(values.OutputParameters) > 0 {\n\t\t\t\t\t\tif node.Outputs == nil {\n\t\t\t\t\t\t\treturn true, fmt.Errorf(\"cannot set output parameters because node is not expecting any raw parameters\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor name, val := range values.OutputParameters {\n\t\t\t\t\t\t\thit := false\n\t\t\t\t\t\t\tfor i, param := range node.Outputs.Parameters {\n\t\t\t\t\t\t\t\tif param.Name == name {\n\t\t\t\t\t\t\t\t\tif param.ValueFrom == nil || param.ValueFrom.Supplied == nil {\n\t\t\t\t\t\t\t\t\t\treturn true, fmt.Errorf(\"cannot set output parameter '%s' because it does not use valueFrom.raw or it was already set\", param.Name)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tnode.Outputs.Parameters[i].Value = wfv1.AnyStringPtr(val)\n\t\t\t\t\t\t\t\t\tnode.Outputs.Parameters[i].ValueFrom = nil\n\t\t\t\t\t\t\t\t\tnodeUpdated = true\n\t\t\t\t\t\t\t\t\thit = true\n\t\t\t\t\t\t\t\t\tAddParamToGlobalScope(ctx, wf, node.Outputs.Parameters[i])\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif !hit {\n\t\t\t\t\t\t\t\treturn true, fmt.Errorf(\"node is not expecting output parameter '%s'\", name)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\twf.Status.Nodes.Set(ctx, nodeID, node)\n\t\t\t\t}\n\t\t\t}\n\t\t}","sourceCodeStart":671,"sourceCodeEnd":707,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/util/util.go#L671-L707","documentation":"While merging reported output parameters into the node, each target parameter must currently be an unset valueFrom.supplied parameter. If the parameter uses another valueFrom source (path, parameter, expression) or its raw value was already populated, this error is returned. It prevents overwriting a resolved value or violating the raw-parameter lifecycle (set exactly once).","triggerScenarios":"WorkflowTaskResult reports a value for an output parameter whose node Outputs already has a non-supplied valueFrom (e.g. path-based) or which was already set — e.g. duplicate reports from re-executed wait containers or double pod reporting.","commonSituations":"Executor wait/init processes both applying the same output, retries causing duplicate PostMain output capture, or templates with both path-based and supplied valueFrom being reconciled.","solutions":["Declare the output parameter with valueFrom.supplied (no path/parameter) when the executor is meant to supply it at runtime.","Avoid duplicate output reporting: run a single executor instance per pod; restart the pod if wait/init raced.","If the value should come from a file, use valueFrom.path instead of supplied and skip the runtime set."],"exampleFix":"// before\noutputs:\n  parameters:\n    - name: msg\n      valueFrom:\n        path: /tmp/msg\n// after (executor sets it as raw output)\noutputs:\n  parameters:\n    - name: msg\n      valueFrom:\n        supplied: {}","handlingStrategy":"validation","validationCode":"for _, p := range node.Outputs.Parameters {\n\tif p.Name == name && (p.ValueFrom == nil || p.ValueFrom.Supplied == nil) {\n\t\treturn fmt.Errorf(\"%q is not a supplied raw parameter\", name)\n\t}\n}","typeGuard":"func isUnsetSuppliedParam(p wfv1.Parameter) bool {\n\treturn p.ValueFrom != nil && p.ValueFrom.Supplied != nil && p.Value == nil\n}","tryCatchPattern":"if err := setOutputs(...); err != nil {\n\tif strings.Contains(err.Error(), \"already set\") {\n\t\t// duplicate report: treat as idempotent success\n\t\treturn nil\n\t}\n\treturn err\n}","preventionTips":["Use valueFrom.supplied only where the executor sets the value at runtime.","Run exactly one executor wait/supervisor process per pod.","Make output application idempotent — ignore re-reports of already-set parameters."],"tags":["outputs","parameters","valuefrom"],"backgroundTag":"output-parameter-already-set","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"}