Argo: Argo rertyStrategy doesn't have "retryOn"

Created on 7 Feb 2020  路  7Comments  路  Source: argoproj/argo

So I'm trying to configure my pod to retry both "on Error" and "on Failure." But Argo doesn't seem to like accept "retryOn" as a parameter to "retryStrategy" as exampled in here: https://github.com/argoproj/argo/tree/master/examples#retrying-failed-or-errored-steps

I've also noted another example which uses "retryPolicy" which Argo throws the same error:
https://github.com/argoproj/argo/blob/master/examples/retry-on-error.yaml

Checklist:

  • [*] I've included the version.
  • [ *] I've included reproduction steps.
  • [* ] I've included the workflow YAML.
  • [ ] I've included the logs.

What happened:
Argo gives me a 'Failed to parse workflow: error unmarshaling JSON: while decoding JSON: json: unknown field "retryOn"'

What you expected to happen:
It would run.

How to reproduce it (as minimally and precisely as possible):
My workflow yaml (up to offending part):
`
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: full-run-dag
spec:
entrypoint: generate
arguments:
parameters:
- name: s3-path
value: placeholder
templates:
- name: generate
parallelism: 16
steps:
- - name: generate
template: gen-file-list
arguments:
parameters:
- name: s3-path
value: "{{workflow.parameters.s3-path}}"

- - name: run-full-pipeline
    template: run-full-pipeline
    arguments:
      parameters:
      - name: file
        value: "{{item}}"
    withParam: "{{steps.generate.outputs.result}}"
  • name: run-full-pipeline
    inputs:
    parameters:

    • name: file
      dag:
      tasks:
    • name: c1
      template: step1
      arguments:
      parameters:

      • name: file

        value: "{{inputs.parameters.file}}"

      • name: s3-path

        value: "{{workflow.parameters.path}}"

    • name: c2
      template: step2
      dependencies: [c1]
      arguments:
      parameters:

      • name: file

        value: "{{inputs.parameters.file}}"

      • name: s3-path

        value: "{{workflow.parameters.path}}"

  • name: gen-file-list
    inputs:
    parameters:

    • name: s3-path
      script:
      image: {myImage}
      command: [python3.6]
      source: |
      [ A python script that generates a list of data files, each one sent to 'step1' for it process]

      env:

    • name: AWS_ACCESS_KEY_ID
      valueFrom:
      secretKeyRef:
      name: aws-secret
      key: aws_access_key_id
    • name: AWS_SECRET_ACCESS_KEY
      valueFrom:
      secretKeyRef:
      name: aws-secret
      key: aws_secret_access_key
  • name: step1
    retryStrategy:
    retryOn: "Always"
    limit: 5

    `

Environment:

  • Argo version:

argo: v2.2.1
BuildDate: 2018-10-11T16:26:28Z
GitCommit: 3b52b26190163d1f72f3aef1a39f9f291378dafb
GitTreeState: clean
GitTag: v2.2.1
GoVersion: go1.10.3
Compiler: gc
Platform: linux/amd64

  • Kubernetes version :

clientVersion:
buildDate: "2019-09-24T22:12:08Z"
compiler: gc
gitCommit: 1861c597586f84f1498a9f2151c78d8a6bf47814
gitTreeState: clean
gitVersion: v1.14.7-eks-1861c5
goVersion: go1.12.9
major: "1"
minor: 14+
platform: linux/amd64
serverVersion:
buildDate: "2019-12-22T23:14:11Z"
compiler: gc
gitCommit: c0eccca51d7500bb03b2f163dd8d534ffeb2f7a2
gitTreeState: clean
gitVersion: v1.14.9-eks-c0eccc
goVersion: go1.12.12
major: "1"
minor: 14+
platform: linux/amd64

Other debugging information (if applicable):
Failed to parse workflow: error unmarshaling JSON: while decoding JSON: json: unknown field "retryOn"



Message from the maintainers:

If you are impacted by this bug please add a 馃憤 reaction to this issue! We often sort issues this way to know what to prioritize.

bug

Most helpful comment

We experienced this error with v2.6.1.

The docs refer to retryOn, which does not appear to be valid. They should refer to retryPolicy

All 7 comments

What version please?

using v2.4.3 and same error is returned.

==========

Problem resolved by upgrading the argo version to v2.5.0-rc9

argo: v2.2.1

retryOn is only available on version v2.5+

We experienced this error with v2.6.1.

The docs refer to retryOn, which does not appear to be valid. They should refer to retryPolicy

I am having the same issue with Argo v2.7.0. Should we open a new Issue?

Error:

Failed to parse workflow: error unmarshaling JSON: while decoding JSON: json: unknown field "retryOn"

YAML:

retryStrategy:
  limit: 2
  retryOn: OnError

Output from argo version:

argo: v2.7.0
  BuildDate: 2020-03-31T23:35:04Z
  GitCommit: 4d1175eb68f6578ed5d599f877be9b4855d33ce9
  GitTreeState: clean
  GitTag: v2.7.0
  GoVersion: go1.13.4
  Compiler: gc
  Platform: linux/amd64

@mattbennett @appellod Sorry about this guys. The correct field name is retryStrategy.retryPolicy.

One of the doc files incorrectly listed the field as retryStrategy.retryOn, that has been fixed in: https://github.com/argoproj/argo/pull/2591

That seems to have fixed it. Thank you for the fast response!

Was this page helpful?
0 / 5 - 0 ratings