(1/4) Add a TTL contract and sweep loop for suspended environments

What does this MR do?

Adds the runtime_environment_ttl runner setting, the runtime_environment_unavailable failure reason, and a loop that asks each executor provider to sweep expired suspended environments at start and every 10 minutes. No provider implements the sweep yet, so this changes nothing on its own.

Why was this MR needed?

The Kubernetes and Docker TTL work both build on it, as the Runner TTL design requires.

What's the best way to test this MR?

go test -race ./common/ ./commands/

What are the relevant issue numbers?

Related to #39469 and #39468.

The GitLab side adds the runtime_environment_unavailable failure reason:

Kubernetes stack:

Docker stack:

Instance executor (stacked on the Docker stack):

Taskscaler stack (slot expiry; (Docker 5/5) Sweep expired suspended docker-aut... (!7667) needs up to gitlab-org/fleeting/taskscaler!123 (merged), (Instance 6/6) Expire suspended instance execut... (!7668) needs gitlab-org/fleeting/taskscaler!118 (merged)):

Edited by Ashvin Sharma

Merge request reports

Loading
Loading