Skip to content

Configurable timeout for "wait-for-service" for services

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Description

I'd like to use services for dependencies, that start rather slowly, but there is no way to do that reliably, if I can't configure the waiting timeout.

context:

Using Docker executor with image docker:18 ...
Starting service docker:18.09-dind ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image docker:18.09-dind ...
Using docker image sha256:e4157102c815f9ed8fec6118171866b13a331b6329ff8f85017f0bf7652917e9 for docker:18.09-dind ...
Waiting for services to be up and running...

*** WARNING: Service runner-abc-project-51-concurrent-0-docker-0 probably didn't start properly.

Health check error:
service "runner-abc-project-51-concurrent-0-docker-0-wait-for-service" timeout

in reality, dind starts fast - this is just an example

Proposal

This just an example, what it could look like

job-build:
  services:
    - name: docker:18.09-dind
      alias: docker
      startup_timeout: 60

the wait-for-service would then simply wait for the given amount of time, instead of the system default

Edited by 🤖 GitLab Bot 🤖