Skip to content

Make RetryAction request enough duration for all of its retries

Add a new attribute RetryAction.timeout_per_retry which contains a Timeout object which will be used for each retry attempt. When the RetryAction timeout is set the value as is will be assigned to the timeout_per_retry but the RetryAction timeout itself will have a duration calculated as (retries * per-retry-timeout + (retries - 1) * sleep). This means the RetryAction will ask for a enough timeout to be able to timeout on all of its retries.

Unlike changes such as making RetryAction ignore the parent timeouts this change will still make RetryAction respect parent timeout but still run for long enough to be able to timeout on all of its retries if the parent timeout allows it. The RetryActions will also display the correct total duration in the pipeline descriptions and emit warnings if the total duration exceeds the job timeout.

Usually the Boot strategies root Actions are attached to the root pipeline meaning their parent timeouts are Job timeouts but several RetryAction can actually be inside the nested Actions where it is important to respect parent Action timeouts.

This is alternative to !2274 and !2425 which made the RetryAction ignore any parent action timeout.

Edited by Igor Ponomarev

Merge request reports