checkout icon indicating copy to clipboard operation
checkout copied to clipboard

Feature Request: Add ability to configure number of retries

Open Enquier opened this issue 8 months ago • 2 comments

In the case where I want to check if a repository exists, it would make my runs more efficient if I could say try this once and fail. Could this be a simple feature to add?

Enquier avatar Nov 01 '23 17:11 Enquier

Yeah! We just had a cryptic error that said:

Prepare all required actions
Getting action download info
Error: Forbidden

It came from a composite action which uses actions/checkout. The thing is, we have a matrix in a top-level action that runs about 10 of these things in parallel. 1 of these 10 failed with this error. So we know the TOKEN is good. It must simply be a matter of unfortunate server problem. Just very unlucky. Besides, when we press the "Re-run job" button it works.

So I'd love to see:

with:
  retries: 3

but I guess the config could be more advanced to let you control which types of errors it should retry on and potentially how to control backoff durations.

peterbe avatar Jan 24 '24 12:01 peterbe

Hmm. Quickly skimming the code and some other issues, it appears there exists an underlying retry functionality. Perhaps it's only set up to retry on unexpected events. What we'd need is for it to retry on Forbidden errors too.

peterbe avatar Jan 24 '24 13:01 peterbe