-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Describe the bug
When both a timeout and retry_on_exit_code are specified, timeouts are not retried.
- name: "Example"
uses: nick-fields/retry@v3
with:
max_attempts: 2
retry_on: any
timeout_minutes: 10
retry_on_exit_code: 2
command: <COMMAND>
Expected behavior
If retry_on is set to any (timeout + error), and timeout_minutes and retry_on_exit_code have valid values specified, then both timeouts and specific exit codes should support retrying.
Implementation details
In the code, it looks like this happens because retry_on_exit_code is evaluated without considering whether the command has finished running. It could be that fixing this issue is as simple as checking that the command has finished executing before evaluating exit codes.
Line 146 in 86d18a3
| } else if (done && inputs.retry_on_exit_code && inputs.retry_on_exit_code !== exit) { |

nathpaiva
Metadata
Metadata
Assignees
Labels
No labels