Feature request - Custom timeout for security jobs

Proposal

This was created on behalf of a GitLab Ultimate customer

In our repositories, the timeout control is set according to the default value of 1 hour [ note 1].

On our runners, the timeout is also configured to 1 hour using [note 2]. This behavior works perfectly for standard jobs, as they typically takes 2-20 minutes. However, scheduled security checks from GitLab Ultimate take much longer, as they involve downloading the entire repository. Therefore, we would like to have a separate timeout value specifically for security checks, which could be configured independently.

Currently, we have implemented a workaround:

  • We increased the timeout for repositories to 5 hours.

  • We created separate runners for security checks, with a 5-hour timeout.

  • All other builds run on other runners with a 1-hour timeout.

Since the smallest timeout is always applied, this allows us to limit regular builds to 1 hour and security checks to 5 hours. Despite the fact that there are currently ways to set timeouts for our security checks, it still feels quite inconvenient for us. Our main request is to have the ability to set a separate timeout for security checks, distinct from the timeout for other types of jobs. This would allow us to configure timeouts independently, reuse runners, and avoid increasing timeouts for other tasks. This approach would help us better monitor execution time and forcefully terminate long-running tasks, which are typically erroneous.

Edited by 🤖 GitLab Bot 🤖