argoproj/argo-workflows · error
cannot set output parameters because node is not expecting…
Error message
cannot set output parameters because node is not expecting any raw parameters
What it means
When applying WorkflowTaskResult output parameters back onto a workflow node (setOutputs path), the node must already declare outputs with parameters. If values.OutputParameters is non-empty but node.Outputs is nil, this error is returned: the executor is reporting outputs the node's template never declared. Failing loudly prevents silently injecting undeclared parameters into the workflow status.
Solutions
- Delete/restart the pod so the node's template matches what the executor reports (re-run the step under the current template).
- Ensure the template declares outputs.parameters for every parameter the step emits.
- If this happens during retries, retry the workflow fresh instead of resuming the stale pod.
Example fix
// before (template has no outputs but emits param)
script:
command: [sh]
source: echo hello
// after
script:
command: [sh]
source: echo hello
outputs:
parameters:
- name: msg
valueFrom:
path: /tmp/msg Defensive patterns
Strategy: validation
Validate before calling
if len(values.OutputParameters) > 0 && node.Outputs == nil {
// pod reports params the node never declared: stale template version
return fmt.Errorf("node %s expects no raw parameters", nodeID)
} Type guard
func nodeExpectsRawParams(n wfv1.NodeStatus) bool {
return n.Outputs != nil && len(n.Outputs.Parameters) > 0
} Try / catch
updated, err := util.SetOutputs(ctx, wf, nodeID, values)
if err != nil && strings.Contains(err.Error(), "not expecting any raw parameters") {
// delete the stale pod / re-run the node under the current template
return requeue
} Prevention
- Declare outputs.parameters for every parameter a step emits.
- Avoid editing templates while their pods are mid-flight.
- After upgrades, resubmit rather than resume stale workflows.
When it happens
Trigger: argoexec reports OutputParameters for a node whose template has no outputs.parameters section — e.g. the template was edited after the pod started, or a pod from an older template version reports params the new spec lacks.
Common situations: Editing a workflow template's outputs while a pod from the previous definition is still running, or retry/resubmit flows mixing node state across template versions.
Related errors
- cannot set output parameter
- node is not expecting output parameter
- raw output parameter
- coudln't obtain child
- couldn't find parent node for
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/ad778761c0c155dc.
Report an issue: GitHub.
Appendix: source
Thrown at workflow/util/util.go:682
// Update phase
if values.Phase != "" {
node.Phase = values.Phase
if values.Phase.Fulfilled(node.TaskResultSynced) {
node.FinishedAt = metav1.Time{Time: time.Now().UTC()}
}
nodeUpdated = true
}
// Update message
if values.Message != "" {
node.Message = values.Message
nodeUpdated = true
}
// Update output parameters
if len(values.OutputParameters) > 0 {
if node.Outputs == nil {
return true, fmt.Errorf("cannot set output parameters because node is not expecting any raw parameters")
}
for name, val := range values.OutputParameters {
hit := false
for i, param := range node.Outputs.Parameters {
if param.Name == name {
if param.ValueFrom == nil || param.ValueFrom.Supplied == nil {
return true, fmt.Errorf("cannot set output parameter '%s' because it does not use valueFrom.raw or it was already set", param.Name)
}
node.Outputs.Parameters[i].Value = wfv1.AnyStringPtr(val)
node.Outputs.Parameters[i].ValueFrom = nil
nodeUpdated = true
hit = true
AddParamToGlobalScope(ctx, wf, node.Outputs.Parameters[i])
break
}
}
if !hit {
return true, fmt.Errorf("node is not expecting output parameter '%s'", name)View on GitHub (pinned to 35bff19146)