Pre-requisites
What happened? What did you expect to happen?
In a steps: workflow, referencing the output parameter of a step that may be skipped causes the workflow to hang or repeatedly requeue. This occurs when the skipped step’s output is used inside another step’s arguments: or when: clause
This behavior matches a reported issue for DAG workflows, but issue remains reproducible for steps
Version(s)
v4.0.4
Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.
piVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: skipped-stage-example-steps-
spec:
entrypoint: main
arguments:
parameters:
- name: run-stage-b
value: "false"
templates:
- name: main
inputs:
parameters:
- name: run-stage-b
steps:
# Step A always runs
- - name: stage-a
template: stage-a
# Step B runs only when run-stage-b == "true"
- - name: stage-b
template: stage-b
when: "{{= inputs.parameters['run-stage-b'] == 'true' }}"
# NEW: Stage C runs only if stage-b ran AND output == "hello from stage B"
- - name: stage-c
template: stage-c
when: "{{= steps['stage-b'].outputs.parameters['output-message'] == 'hello from stage B' }}"
# Stage D always runs, even if stage-b was skipped
- - name: stage-d
template: stage-d
arguments:
parameters:
- name: message-from-a
value: "{{steps.stage-a.outputs.parameters.output-message}}"
- name: message-from-b
value: "{{steps.stage-b.outputs.parameters.output-message}}"
# -------------------------
# STAGE A
# -------------------------
- name: stage-a
outputs:
parameters:
- name: output-message
valueFrom:
path: /tmp/output.txt
container:
image: alpine:3.18
command: [sh, -c]
args: ["echo 'hello from stage A' | tee /tmp/output.txt"]
# -------------------------
# STAGE B (optional)
# -------------------------
- name: stage-b
outputs:
parameters:
- name: output-message
valueFrom:
path: /tmp/output.txt
container:
image: alpine:3.18
command: [sh, -c]
args: ["echo 'hello from stage B' | tee /tmp/output.txt"]
# -------------------------
# STAGE C (conditional)
# -------------------------
- name: stage-c
container:
image: alpine:3.18
command: [sh, -c]
args:
- |
echo "stage-c ran because stage-b output matched the expected value"
# -------------------------
# STAGE D (always runs)
# -------------------------
- name: stage-d
inputs:
parameters:
- name: message-from-a
- name: message-from-b
container:
image: alpine:3.18
command: [sh, -c]
args:
- |
echo "stage-d received: [{{inputs.parameters.message-from-a}}] and [{{inputs.parameters.message-from-b}}]"
Logs from the workflow controller
kubectl logs -n argo deploy/workflow-controller | grep ${workflow}
workflow-controller-5c69d51257-pbaxv time=2026-04-16T18:11:30.029Z level=ERROR msg="Failed to resolve references" error=requeue component=workflow_worker workflow=skipped-stage-example-steps-wxp9j namespace=argo stepName=stage-c
workflow-controller-5c69d51257-pbaxv time=2026-04-16T18:11:31.034Z level=ERROR msg="Failed to resolve references" component=workflow_worker workflow=skipped-stage-example-steps-wxp9j namespace=argo stepName=stage-c error=requeue
workflow-controller-5c69d51257-pbaxv time=2026-04-16T18:11:32.042Z level=ERROR msg="Failed to resolve references" workflow=skipped-stage-example-steps-wxp9j stepName=stage-c error=requeue namespace=argo component=workflow_worker
workflow-controller-5c69d51257-pbaxv time=2026-04-16T18:11:33.049Z level=ERROR msg="Failed to resolve references" workflow=skipped-stage-example-steps-wxp9j error=requeue namespace=argo stepName=stage-c component=workflow_worker
Logs from in your workflow's wait container
kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
Pre-requisites
:latestimage tag (i.e.quay.io/argoproj/workflow-controller:latest) and can confirm the issue still exists on:latest. If not, I have explained why, in detail, in my description below.What happened? What did you expect to happen?
In a
steps: workflow, referencing the output parameter of a step that may be skipped causes the workflow to hang or repeatedly requeue. This occurs when the skipped step’s output is used inside another step’sarguments: orwhen: clauseThis behavior matches a reported issue for DAG workflows, but issue remains reproducible for steps
Version(s)
v4.0.4
Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container