Skip to content

Set default runner script timeout to allow after_script

Arran Walker requested to merge ajwalker/default-runner-script-timeout into main

What does this MR do / why needed?

Sets the default runner script timeout to be -5 minutes (the default timeout for after_script) from the time remaining for the job.

This is intended to allow time for after_script and other stages to execute towards the end of the job. This won't always work, and sometimes setting the runner and after_script timeouts explicitly will be required for every stage to complete in time, but this is seen as a sane default that will work in the majority of cases.

This default is set regardless of whether an after_script has been defined, because it's also used by any other stages that might run (artifacts, caches, cleanup etc.).

What's the best way to test this MR?

  1. Run a job and set the timeout to 10m.
  2. Run a long-running script.
  3. Long running script should terminate, and after_script still have time to run.

What are the relevant issue numbers?

Merge request reports

Loading