Fallback runners?

Problem to solve

We have a pool of transient runner instances that we want jobs to run on. If none of them are available, we’d like gitlab.com saas to fallback to gitlab’s saas-linux-medium-amd64 runner. How can we do that? It appears as though the elements in a job’s tags list are logically ANDed.

Steps to reproduce

  1. Add both org-transient-runner & saas-linux-medium-amd64 to the tags element of a job.
  2. Kick off a pipeline.
  3. Observe stuck pipeline due to no runners having both tags.

Configuration

do-the-needful:
  stage: root
  script:
    - echo This should use an `org-transient-runner` if available, else fall back to a `saas-linux-medium-amd64` gitlab saas runner.
  tags:
    - org-transient-runner
    - saas-linux-medium-amd64

Versions

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

PS: Not the first time this has been asked: Any way to use a secondary gitlab runner if the primary runner is down?Any way to use a secondary gitlab runner if the primary runner is down?

1 Like

FWIW we’d like this too but for the opposite reason. We might as well use the cloud runners that are part of our subscription for all suitable CI jobs, saving our local runners for the more specialised jobs, but would like the local runners to be used when we’ve spent all our cloud CI minutes.