Enforce prepare_timeout config field
What does this MR do?
- Cancels a job if the
preparestage (theprepare_executorandprepare_scriptstages combined) takes longer than the configuredprepare_timeout. - Surfaces the timeout as
ERROR: Job failed (system failure): prepare timeoutin the job output. - Subsequent stages (e.g.,
get_sources) are NOT bounded byprepare_timeout.
Why was this MR needed?
Solves the problem of jobs hanging for a long time (up to the full job timeout) and occupying concurrency slots when the prepare stage is taking too long (e.g., due to a slow/hung image pull).
Part of #26583 (closed)
What's the best way to test this MR?
Timeout Path:
- Configure a runner with a very short
prepare_timeout(e.g.,1ms) in yourconfig.toml - Execute a job using that runner
- Verify the job fails with
ERROR: Job failed (system failure): prepare timeout
Happy Path:
- Configure a runner with a reasonable
prepare_timeout(e.g.,30s) in yourconfig.toml - Execute a job using that runner
- Verify the job completes successfully
What are the relevant issue numbers?
Implements #39373 (closed), #39374 (closed)