Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support filter node type in retry expression. Fixes: #13990 #14201

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shuangkun
Copy link
Member

@shuangkun shuangkun commented Feb 17, 2025

I hope to configure the global retryStrategy uniformly, but I don't want the Step/DAG type retry to cause the task to be re-run.

#13990 (comment)

Fixes #13990

Motivation

Modifications

Verification

UT and Local test
For Workflow

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: test01-fail-
spec:
  entrypoint: step-entrypoint
  templates:
  - name: step-entrypoint
    steps:
    - - name: step-a
        template: a
    - - name: step-b
        template: dag-b

  - name: dag-b
    dag:
      tasks:
      - name: dag-b
        template: b

  - name: a
    container:
      image: busybox:latest
      command: [sh, -c]
      args: ["echo a step && sleep 5"]

  - name: b
    container:
      image: busybox:latest
      command: [sh, -c]
      args: ["echo b step && sleep 5 && exit 1"]

template b always failed.

With global RetryStrategy in workflow-controller-configmap:

        retryStrategy:
          limit: 4

image

After add the feature, and with global RetryStrategy in workflow-controller-configmap:

        retryStrategy:
          limit: 4
          expression: "retry.nodeType == 'Pod'"

image

Documentation

add "retry.nodeType" in docs/retries.md and docs/variables.md

Signed-off-by: shuangkun <[email protected]>
Signed-off-by: shuangkun <[email protected]>
@shuangkun
Copy link
Member Author

/retest

2 similar comments
@shuangkun
Copy link
Member Author

/retest

@shuangkun
Copy link
Member Author

/retest

@tczhao
Copy link
Member

tczhao commented Feb 23, 2025

I'm thinking if we should have node.type available to all template instead of adding it in the retryexpression

instead of having it only available to retry strategy.

node.type naturally aligns with the current variable names and we don't need to introduce additional retry.variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The global retryStrategy is only for Pod type (not Step/DAG template)
2 participants