Ordering of automatic retry attributes

When specifying command automatic retry attributes, what the meaning of the order in which I specify the different criteria? If multiple entries match for a given job, will the last match, first match, most specific match apply? If “most specific”, how is this measured?

Concretely, I want to

Do I specify the exit_status: "*" before or after the agent rules?

We currently have it before which seems to work? I tried and failed to find an authoritative answer so I wanted to ask explicitly.

Hello @mr_chronosphere ! :sparkles:

We’re taking a look at this for you and will get back to you asap!

Thanks! :sparkling_heart:

Hi again @mr_chronosphere ! :sparkles:

Basically, you’d want to have the failure -1 first since you want to catch that separately. Rules should be parsed in order of appearance, so if the error is not -1, it will move onto the next, which will be * for a catch all. :dizzy:

So, in your case you could write it like this:

        - exit_status: -1
          limit: 2
        - exit_status: "*"
          limit: 1

Have a wonderful day! :sparkling_heart:

1 Like