Feature flag rollout: ci_job_token_gitaly_client_name
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Roll out the feature flag ci_job_token_gitaly_client_name (type: gitlab_com_derisk, group: group::gitaly, milestone: 19.5, default_enabled: false), introduced in !258795 (merged).
When enabled, GitLab Rails sets the Gitaly gRPC call_metadata['client_name'] to gitlab-ci-job for git-over-HTTP requests authenticated with a CI job token. Today those requests reach Gitaly labelled as gitlab-workhorse, identical to an interactive developer clone, so CI traffic is invisible as a distinct source in Gitaly telemetry. This flag gives CI git calls their own identity in that metadata without changing any git behaviour.
What the flag controls
- Scope: git-over-HTTP requests authenticated with a CI job token (the runner's checkout and every other git call a job makes with
CI_JOB_TOKEN). - Effect: the
client_namevalue in Gitaly's gRPCcall_metadatachanges fromgitlab-workhorsetogitlab-ci-jobfor those requests. It appears asgrpc.meta.client_nameon Gitaly's access-log lines and as theclient_namelabel ofgitaly_service_client_requests_total. - No change to the git operations themselves, to access control, or to response payloads. This is a labelling change only.
- No change to concurrency limiting. Gitaly's limiter is keyed by repository;
client_nameonly reaches it throughinternal_clients, and only for calls that carry nousername. Job-token calls carry the job's user (GL_USERNAME), so they stay on the authenticated per-repository budget before and after the flag.
Prerequisites
-
!258795 (merged) merged 2026-10-15 22:58 UTC (4e76b70d); the flag exists in production from the next deploy.
-
gitlab-com/runbooks!11787 (merged) merged (2026-10-12): adds a CI jobs flow to the Gitaly ingress-flow dashboard and makes its Workhorse box match both names. Without it, CI traffic silently disappears from that diagram when the flag flips.
Rollout plan
- Enable on staging:
/chatops run feature set ci_job_token_gitaly_client_name true --staging - Confirm a
client_name="gitlab-ci-job"series appears ingitaly_service_client_requests_totalon gstg and thegitlab-workhorseseries drops by a corresponding amount; confirm the ingress-flow dashboard's Workhorse box still equals its two feeders. - Enable on production at 10% of time first (the flag has no actor, so percentage-of-time is the only partial rollout):
/chatops run feature set ci_job_token_gitaly_client_name 10 --production, watch for an hour, thentrue. - Confirm the same shift on gprd, with no change in
ResourceExhaustedrates or latency forPostUploadPackWithSidechannel/InfoRefsUploadPack. - Leave enabled; open the flag-removal MR once the series has been stable for two weeks (the
gitlab_com_derisklifespan is 2 months from merge).
What to watch
- Any dashboard, alert or SLO that filters on
client_name="gitlab-workhorse"sees that series drop once CI traffic splits off. Expected, not a regression. Known consumers:dashboards/gitaly/ingress-flow.dashboard.jsonnet(fixed by runbooks!11787) anddashboards/gitaly/traffic-sources.dashboard.jsonnet(text only; its per-client panel groups byclient_nameand picks the new value up automatically). Nothing inmetrics-catalog/ormimir-rules/filters onclient_name. - Gitaly's limiter: nothing should move (see above). If
ResourceExhaustedfor job-token calls changes with the flag, that is a finding, not an expected effect.
Rollback
Disable the flag. The client_name label reverts to gitlab-workhorse immediately for all affected requests; no deploy or data migration required.
Removal criteria
Remove the flag check in Gitlab::Workhorse.attribute_ci_job and the flag definition once:
- it has been enabled fleet-wide and the
gitlab-ci-jobseries has been stable for two weeks with no unexplained change in Gitaly dashboards or limiter behaviour, and - runbooks!11787 is merged.
At that point gitlab-ci-job becomes the permanent, unconditional value.
Related
- gitaly#7473: log the CI job id on Gitaly access-log lines (job-level attribution; needs a Gitaly change first, then Workhorse forwarding).