Skip to content

Regression: Workflow with skipped step stuck because failed to resolve references #16123

@spaced

Description

@spaced

Pre-requisites

  • I have double-checked my configuration
  • I have tested with the :latest image 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.
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened? What did you expect to happen?

works until v4.0.1, but not with > v4.0.2

when a step is skipped,
but next step has an expression like

"{{= steps['sayhiskippy'].status == 'Skipped' ? 'skippy' : steps['sayhiskippy'].outputs.parameters.out }}"

Version(s)

v4.0.2, v4.0.3,v4.0.4,v4.0.5

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.

---
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: test-skipped-step
spec:
  entrypoint: main
  arguments:
    parameters:
      - name: a_string
        value: 'one-two'
  templates:
    - name: main
      steps:
        - - name: sayhiskippy
            template: sayhi
            arguments:
              parameters:
                - name: text
                  value: "this is the skippy"
            when: "{{= workflow.parameters.a_string != 'one-two' }}"
        - - name: afterskippy
            template: sayhi
            arguments:
              parameters:
                - name: text
                  value: "{{= steps['sayhiskippy'].status == 'Skipped' ? 'skippy' : steps['sayhiskippy'].outputs.parameters.out }}"

    - name: sayhi
      inputs:
        parameters:
          - name: text
      outputs:
        parameters:
          - name: out
            valueFrom:
              path: /tmp/out
      script:
        image: alpine:latest
        command:
          - sh
        source: |
          echo "hello {{inputs.parameters.text }}" > /tmp/out

Logs from the workflow controller

kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

{"time":"2026-05-20T14:23:08.023039084Z","level":"WARN","msg":"was unable to find variable","workflow":"test-skipped-step-2ktbs","namespace":"**","error":"failed to evaluate expression
: steps.sayhiskippy.outputs is missing","component":"workflow_worker"}
{"time":"2026-05-20T14:23:08.023059164Z","level":"ERROR","msg":"Failed to resolve references","component":"workflow_worker","workflow":"test-skipped-step-2ktbs","error":"requeue","namespace"
:"**","stepName":"afterskippy"}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions