Skip to content

Retry Node using withParam, retryStrategy, and parameter override causes unaffected nodes to disappear #16055

@ddlenz

Description

@ddlenz

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?

argo submit workflow-retry.yaml -p wfparams=[\"pass\",\"fail\"]
In the UI, open the workflow and wait for it to complete.
There should be two nodes under workflow-retry:
launch(1:fail) and launch(0:pass)

Select the node labeled launch(1:fail) and then Retry Node > Override Parameters
Set Parameters to ["success"] and then Retry

Observed: A launch(0:success) node starts and succeeds. The launch(0:pass) node and its descendant disappear.

Expected: A launch(0:success) node starts and succeeds. The launch(0:pass) node and its descendant remain as-is.

Version(s)

v4.0.5

Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: workflow-retry
spec:
  entrypoint: main
  arguments:
    parameters:
      - name: wfparams

  templates:
    - name: main
      dag:
        tasks:
          - name: launch
            template: passfail
            arguments:
              parameters:
                - name: pfparam
                  value: "{{item}}"
            withParam: "{{workflow.parameters.wfparams}}"

    - name: passfail
      retryStrategy:
        limit: "0"
      inputs:
        parameters:
          - name: pfparam
      container:
        name: main
        image: alpine:3.15.4
        command: [sh, -c]
        args:
          - |
            echo "pfparam: {{inputs.parameters.pfparam}}"
            if [ "{{inputs.parameters.pfparam}}" = "fail" ]; then
              exit 1
            else
              exit 0
            fi

Logs from the workflow controller

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

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

    type/regressionRegression from previous behavior (a specific type of bug)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions