Services execution order in a ci job

job’s services execution order

Hello, I have a job like this:

e2e-test-job:
  stage: test-images
  services:
    - name: bitnami/postgresql:16-debian-12
      alias: cydb
      entrypoint:
        - "/bin/bash"
        - "-c"
        - |
          ...filling the database with fixtures...
    - name: $ourimagetotest
      alias: eap
      variables:
        FF_NETWORK_PER_BUILD: 1
        ...
      image:
        name: cypress/included:13.6.4
        ...
       script:
         - ..here we execute cypress tests against eap

The job relies on three actors: the database, our image, which relies on the database and the test image which runs tests against our image. I am experiencing failures because eap service spring up before the cydb one causing the container to fail, so there is no service to run our tests against. Occasionally, cydb raises up just in time, so eap can lean on him and tests runs. Is there any setting I miss to guarantee services are executed in the order I define in job? Thankyou

Steps to reproduce

See the job posted here

Configuration

see the job posted here

Versions

Gitlab version 15.10.6-ee

  • Self-managed
  • GitLab.com SaaS
  • [ x] Self-hosted Runners

Versions

  • GitLab: 15.10.6-ee
  • GitLab Runner: gitlab/gitlab-runner:alpine-v15.10.1

Helpful resources

  1. Before opening a new topic, make sure to search for keywords in the forum search
  2. Check the GitLab Runner and GitLab projects for existing issues. If you encounter a bug, please create a bug report issue.
  3. Troubleshooting docs: GitLab Runner, self-managed GitLab instances.

Thanks for taking the time to be thorough in your request, it really helps! :blush: