Add get_sources timeout to runner config
What does this MR do?
Adds a get_sources_timeout runner config option that bounds the get_sources stage independently of the overall job timeout.
When the configured duration is exceeded, the job fails fast with Job failed: get sources timeout: exceeded timeout of <duration>. Falls back to the job timeout if unset, zero, or greater than the job timeout (with a warning logged for the latter two). Follows the same pattern as prepare_timeout.
Why was this MR needed?
Hung git clone/git fetch operations (network issues) currently consume the full job timeout, wasting runner concurrency slots and delaying feedback. get_sources_timeout lets administrators fail these jobs quickly without lowering the job timeout used by the actual work.
What's the best way to test this MR?
- Run
go test ./common/ -run "TestGetGetSourcesTimeout|TestBuildGetSources" -count=1 -v - For end-to-end verification, you can set
get_sources_timeoutto a short value inconfig.tomland trigger a job. The job log should end withJob failed: get sources timeout: exceeded timeout of <duration>and the failure attribution should match the existing job timeout behaviour otherwise.
What are the relevant issue numbers?
Implements #39426 (closed)
Edited by Daniel Keenan