failFast permanently abandons a retryStrategy'd item after its first failed attempt, never letting it retry

Author: capacmanCreated Sep 23, 2026Updated Sep 23, 2026

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?

With failFast: true + parallelism: 1, an item processed via withParam that has its own retryStrategy never gets to use its retries: the very first failed attempt is enough for failFast to tear down the whole boundary, regardless of how many retry attempts remain.

Root cause: getUnsuccessfulChildrenCounter in workflow/controller/node_counters.go counts a failed Pod node as an "unsuccessful child" unconditionally — it never checks whether that pod is still owned by an in-progress retryStrategy (i.e. NodeFlag.Retried == true). So checkParallelism's failFast check (workflow/controller/operator.go) fires on the very first attempt failure, before the owning Retry node ever gets a chance to schedule attempt 1.

Reproduced twice: once on a live v3.7.18 cluster, and again today on a fresh, vanilla (unpatched) :latest deployment (chart 2.0.8/appVersion v4.1.4, see version details above). The flaky item is written so it deterministically fails on attempt 0 and would succeed on attempt 1 (using the built-in {{retries}} variable) — this proves the retry never got a chance, rather than genuinely exhausting.

The controller log for the :latest run makes the bug unambiguous — the pod fails and the boundary is torn down in the same reconcile, one millisecond apart, with zero attempt to check for remaining retries: time=2026-09-23T13:56:20.437Z level=INFO msg="Pod failed" ... message="main: Error (exit code 1)" displayName=item(2:flaky)(0) ... time=2026-09-23T13:56:20.438Z level=INFO msg="node phase changed" node=...-1008541149 fromPhase=Running toPhase=Failed time=2026-09-23T13:56:20.438Z level=INFO msg="node message changed" ... message="template has failed or errored children and failFast enabled"

Actual result (full status JSON and logs below): - item(2:flaky)'s pod (nodeFlag.retried: true) fails at 13:56:20Z (attempt 0 — the container itself logs running item=flaky attempt=0 then deliberately exits 1). - Attempt 1 (which would have succeeded — the container script only fails when {{retries}} < 1) is never created. - The item(2:flaky) Retry node itself is left permanently "phase": "Running" with no finishedAt — even though the workflow is reported "phase": "Failed", "finishedAt": "2026-09-23T13:56:30Z". So a completed workflow permanently contains a node stuck Running with no pod behind it. This looks like it could also affect resourcesDuration accounting, UI display, and anything else that assumes every node is Fulfilled once the workflow is complete. - Item c (the 4th withParam entry) is never attempted at all, which is expected/correct once failFast legitimately fires — the actual bug is that it fires prematurely, before flaky's retries are exhausted. Expected behavior: failFast should only treat an item as "unsuccessful" once its retryStrategy is fully exhausted (i.e. the Retry node itself reaches a terminal Failed/Error phase) — not on any single intermediate attempt. Once that's respected, failFast should still correctly stop any not-yet-started items and bring the workflow to a clean terminal Failed state (no node left dangling in Running).

Version(s)

v3.7.18 (originally reproduced on a live cluster) :latest as of 2026-09-23, confirmed with: - argo/argo-workflows Helm chart 2.0.8 (appVersion v4.1.4) - quay.io/argoproj/workflow-controller@sha256:5274127e02025e5aa34c469e3387fb31f02c2d09362fb4750d642419accf454a - gitCommit=084009d56aff757927b6373236ecb291018b4726, buildDate=2026-09-23T08:46:57Z

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.

yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: failfast-retry-bug-
spec:
  entrypoint: main
  templates:
  - name: main
    failFast: true
    parallelism: 1
    steps:
    - - name: item
        template: run
        withParam: '["a","b","flaky","c"]'
        arguments:
          parameters:
          - name: item
            value: "{{item}}"
  - name: run
    inputs:
      parameters:
      - name: item
    retryStrategy:
      limit: "2"
      retryPolicy: Always
      backoff:
        duration: "5s"
    container:
      image: alpine:3.20
      command: [sh, -c]
      args:
      - |
        echo "running item={{inputs.parameters.item}} attempt={{retries}}"
        if [ "{{inputs.parameters.item}}" = "flaky" ] && [ "{{retries}}" -lt "1" ]; then
          echo "failing on purpose (this item would succeed on retry attempt 1)"
          exit 1
        fi
        echo ok

Logs from the workflow controller

time=2026-09-23T13:55:29.790Z level=INFO msg="Processing workflow" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default phase="" resourceVersion=959
time=2026-09-23T13:55:29.795Z level=INFO msg="resolved artifact repository" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default artifactRepositoryRef=default-artifact-repository
time=2026-09-23T13:55:29.795Z level=INFO msg="Task-result reconciliation" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default numObjs=0
time=2026-09-23T13:55:29.795Z level=INFO msg="updated phase" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default fromPhase="" toPhase=Running
time=2026-09-23T13:55:29.796Z level=INFO msg="node initialized" message="" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw phase=Running
time=2026-09-23T13:55:29.796Z level=INFO msg="node initialized" workflow=failfast-retry-bug-bbwsw namespace=default component=workflow_worker message="" node=failfast-retry-bug-bbwsw-1008541149 phase=Running
time=2026-09-23T13:55:29.797Z level=INFO msg="node initialized" component=workflow_worker workflow=failfast-retry-bug-bbwsw node=failfast-retry-bug-bbwsw-3111840542 phase=Running message="" namespace=default
time=2026-09-23T13:55:29.797Z level=INFO msg="node initialized" namespace=default node=failfast-retry-bug-bbwsw-3111418445 phase=Pending message="" component=workflow_worker workflow=failfast-retry-bug-bbwsw
time=2026-09-23T13:55:30.138Z level=INFO msg="Created pod" namespace=default component=workflow_worker workflow=failfast-retry-bug-bbwsw podName=failfast-retry-bug-bbwsw-run-3111418445 nodeName=failfast-retry-bug-bbwsw[0].item(0:a)(0) nodeID=failfast-retry-bug-bbwsw-3111418445
time=2026-09-23T13:55:30.139Z level=INFO msg="template active children parallelism exceeded" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw parallelism=1
time=2026-09-23T13:55:30.153Z level=INFO msg="Workflow update successful" phase=Running component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default resourceVersion=964
time=2026-09-23T13:55:40.141Z level=INFO msg="Processing workflow" phase=Running resourceVersion=964 workflow=failfast-retry-bug-bbwsw namespace=default component=workflow_worker
time=2026-09-23T13:55:40.142Z level=INFO msg="entry template execution deferred, will requeue" namespace=default component=workflow_worker workflow=failfast-retry-bug-bbwsw error="Max parallelism reached"
time=2026-09-23T13:55:50.162Z level=INFO msg="Processing workflow" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default phase=Running resourceVersion=973
time=2026-09-23T13:55:50.163Z level=INFO msg="entry template execution deferred, will requeue" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default error="Max parallelism reached"
time=2026-09-23T13:56:00.334Z level=INFO msg="Processing workflow" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default phase=Running resourceVersion=973
time=2026-09-23T13:56:00.336Z level=INFO msg="node phase changed" node=failfast-retry-bug-bbwsw-3111840542 fromPhase=Running toPhase=Succeeded component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default
time=2026-09-23T13:56:00.336Z level=INFO msg="node initialized" node=failfast-retry-bug-bbwsw-2399944164 namespace=default component=workflow_worker workflow=failfast-retry-bug-bbwsw phase=Running message=""
time=2026-09-23T13:56:00.337Z level=INFO msg="node initialized" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw-3723221711 phase=Pending message=""
time=2026-09-23T13:56:00.418Z level=INFO msg="Created pod" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default nodeName=failfast-retry-bug-bbwsw[0].item(1:b)(0) nodeID=failfast-retry-bug-bbwsw-3723221711 podName=failfast-retry-bug-bbwsw-run-3723221711
time=2026-09-23T13:56:00.434Z level=INFO msg="Workflow update successful" namespace=default resourceVersion=1001 phase=Running component=workflow_worker workflow=failfast-retry-bug-bbwsw
time=2026-09-23T13:56:00.439Z level=INFO msg="cleaning up pod" action=labelPodCompleted namespace=default podName=failfast-retry-bug-bbwsw-run-3111418445 component=pod_controller
time=2026-09-23T13:56:10.419Z level=INFO msg="Processing workflow" workflow=failfast-retry-bug-bbwsw namespace=default phase=Running resourceVersion=1001 component=workflow_worker
time=2026-09-23T13:56:10.423Z level=INFO msg="node phase changed" fromPhase=Running toPhase=Succeeded component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw-2399944164
time=2026-09-23T13:56:10.424Z level=INFO msg="node initialized" workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw-1704975094 phase=Running message="" component=workflow_worker
time=2026-09-23T13:56:10.425Z level=INFO msg="node initialized" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw-2883266549 phase=Pending message=""
time=2026-09-23T13:56:10.434Z level=INFO msg="Created pod" component=workflow_worker podName=failfast-retry-bug-bbwsw-run-2883266549 workflow=failfast-retry-bug-bbwsw nodeName=failfast-retry-bug-bbwsw[0].item(2:flaky)(0) nodeID=failfast-retry-bug-bbwsw-2883266549 namespace=default
time=2026-09-23T13:56:10.452Z level=INFO msg="Workflow update successful" namespace=default resourceVersion=1032 phase=Running component=workflow_worker workflow=failfast-retry-bug-bbwsw
time=2026-09-23T13:56:10.458Z level=INFO msg="cleaning up pod" namespace=default podName=failfast-retry-bug-bbwsw-run-3723221711 component=pod_controller
time=2026-09-23T13:56:20.436Z level=INFO msg="Processing workflow" workflow=failfast-retry-bug-bbwsw namespace=default phase=Running resourceVersion=1032 component=workflow_worker
time=2026-09-23T13:56:20.437Z level=INFO msg="Pod failed" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default message="main: Error (exit code 1)" displayName=item(2:flaky)(0) templateName=run pod=failfast-retry-bug-bbwsw-run-2883266549
time=2026-09-23T13:56:20.438Z level=INFO msg="node phase changed" node=failfast-retry-bug-bbwsw-1008541149 component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default fromPhase=Running toPhase=Failed
time=2026-09-23T13:56:20.438Z level=INFO msg="node message changed" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw-1008541149 message="template has failed or errored children and failFast enabled"
time=2026-09-23T13:56:20.438Z level=INFO msg="node finished" node=failfast-retry-bug-bbwsw-1008541149 finishedAt=2026-09-23T13:56:20.438152213Z component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default
time=2026-09-23T13:56:20.438Z level=INFO msg="node phase changed" workflow=failfast-retry-bug-bbwsw node=failfast-retry-bug-bbwsw fromPhase=Running toPhase=Failed namespace=default component=workflow_worker
time=2026-09-23T13:56:20.438Z level=INFO msg="node message changed" message="template has failed or errored children and failFast enabled" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw
time=2026-09-23T13:56:20.438Z level=INFO msg="node finished" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default node=failfast-retry-bug-bbwsw finishedAt=2026-09-23T13:56:20.438241381Z
time=2026-09-23T13:56:20.438Z level=INFO msg="entry template execution deferred, will requeue" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default error="Max parallelism reached"
time=2026-09-23T13:56:20.455Z level=INFO msg="Workflow update successful" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default resourceVersion=1062 phase=Running
time=2026-09-23T13:56:20.455Z level=INFO msg="Event occurred" type=Warning reason=WorkflowNodeFailed message="Failed node failfast-retry-bug-bbwsw: template has failed or errored children and failFast enabled"
time=2026-09-23T13:56:20.461Z level=INFO msg="cleaning up pod" action=labelPodCompleted namespace=default podName=failfast-retry-bug-bbwsw-run-2883266549 component=pod_controller
time=2026-09-23T13:56:30.460Z level=INFO msg="Processing workflow" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default resourceVersion=1062 phase=Running
time=2026-09-23T13:56:30.461Z level=INFO msg="updated phase" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default fromPhase=Running toPhase=Failed
time=2026-09-23T13:56:30.461Z level=INFO msg="updated message" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default fromMessage="" toMessage="template has failed or errored children and failFast enabled"
time=2026-09-23T13:56:30.461Z level=INFO msg="Marking workflow completed" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default
time=2026-09-23T13:56:30.484Z level=INFO msg="Workflow update successful" component=workflow_worker workflow=failfast-retry-bug-bbwsw namespace=default phase=Failed resourceVersion=1073

Logs from in your workflow's wait container

time=2026-09-23T13:56:15.901Z level=INFO msg="Starting Workflow Executor" version=untagged buildDate=2026-09-23T08:46:57Z gitCommit=084009d56aff757927b6373236ecb291018b4726
time=2026-09-23T13:56:15.902Z level=INFO msg="Using executor retry strategy" Jitter=0.5 argo=true Steps=5 Duration=1s Factor=1.6
time=2026-09-23T13:56:15.903Z level=INFO msg="Executor initialized" podName=failfast-retry-bug-bbwsw-run-2883266549 namespace=default templateName=run
time=2026-09-23T13:56:15.911Z level=INFO msg="Starting deadline monitor" argo=true containers=[main]
time=2026-09-23T13:56:17.051Z level=INFO msg="Main container completed" argo=true error=<nil>
time=2026-09-23T13:56:17.051Z level=INFO msg="No output parameters" argo=true
time=2026-09-23T13:56:17.057Z level=info msg="Alloc=9884 TotalAlloc=16725 Sys=28038 NumGC=4 Goroutines=9"
time=2026-09-23T13:56:17.062Z level=INFO msg="Deadline monitor stopped" argo=true