Pilot runners failover
What does this MR do?
Introduces a single USE_PILOT_RUNNERS toggle (default: true) that makes all runner tags variable-driven. When disabled, jobs fall back to shared/instance runner tags, restoring GitLab Duo.
Files Changed
1. .gitlab/ci/_project_canonical.gitlab-ci.yml — Tag anchors use CI variable references:
.instance-default: $RUNNER_TAG_DEFAULT
.instance-default-docker: $RUNNER_TAG_DOCKER
.instance-2xlarge: $RUNNER_TAG_2XLARGE
.instance-medium: $RUNNER_TAG_MEDIUM
.instance-windows-2019: $RUNNER_TAG_WINDOWS_2019
.instance-windows-2022: $RUNNER_TAG_WINDOWS_2022
2. .gitlab/ci/_common.gitlab-ci.yml — Added toggle and pilot tag defaults:
USE_PILOT_RUNNERS: "true"
RUNNER_TAG_DEFAULT: "functions-pilot-linux-amd64"
RUNNER_TAG_DOCKER: "functions-pilot-linux-amd64"
RUNNER_TAG_2XLARGE: "functions-pilot-linux-amd64"
RUNNER_TAG_MEDIUM: "functions-pilot-linux-amd64"
RUNNER_TAG_WINDOWS_2019: "functions-pilot-windows-amd64"
RUNNER_TAG_WINDOWS_2022: "functions-pilot-windows-amd64"
3. .gitlab/ci/_rules.gitlab-ci.yml — Workflow rule overrides tags when toggle is off:
- if: '$USE_PILOT_RUNNERS == "false"'
variables:
RUNNER_TAG_DEFAULT: "gitlab-org"
RUNNER_TAG_DOCKER: "gitlab-org-docker"
RUNNER_TAG_2XLARGE: "saas-linux-2xlarge-amd64"
RUNNER_TAG_MEDIUM: "saas-linux-medium-amd64"
RUNNER_TAG_WINDOWS_2019: "windows-1809"
RUNNER_TAG_WINDOWS_2022: "windows-21h1"
4. .gitlab/ci/build.gitlab-ci.yml — Fixed hardcoded tag:
# before
helper images:
tags:
- saas-linux-2xlarge-amd64
# after
helper images:
tags:
- !reference [.instance-2xlarge]
Tag Mapping
| Variable | Pilot (default) | Fallback (USE_PILOT_RUNNERS=false) |
|---|---|---|
RUNNER_TAG_DEFAULT |
functions-pilot-linux-amd64 |
gitlab-org |
RUNNER_TAG_DOCKER |
functions-pilot-linux-amd64 |
gitlab-org-docker |
RUNNER_TAG_2XLARGE |
functions-pilot-linux-amd64 |
saas-linux-2xlarge-amd64 |
RUNNER_TAG_MEDIUM |
functions-pilot-linux-amd64 |
saas-linux-medium-amd64 |
RUNNER_TAG_WINDOWS_2019 |
functions-pilot-windows-amd64 |
windows-1809 |
RUNNER_TAG_WINDOWS_2022 |
functions-pilot-windows-amd64 |
windows-21h1 |
Why was this MR needed?
Pilot runners were tagged with gitlab-org to match existing jobs. Shared/instance runners were disabled to ensure deterministic routing, which broke GitLab Duo (needs instance runners with gitlab--duo tag). This MR allows re-enabling shared/instance runners since pilot runners now have unique functions-pilot-* tags.
What's the best way to test this MR?
- Default behavior: verify pipeline jobs are picked up by
functions-pilot-*runners - Set
USE_PILOT_RUNNERS=falseas a CI/CD variable and verify jobs fall back to shared/instance runners