Add job_telemetry feature negotiation to CI job request
What does this MR do and why?
Adds job_telemetry: true to the features object in the /api/v4/jobs/request response, gated behind the ci_job_telemetry beta feature flag.
This is the Rails-side implementation of feature negotiation for CI job telemetry. When the feature flag is enabled for a project, the runner receives job_telemetry: true in the job payload, signaling it to emit telemetry data.
- Relates to #590588 (closed)
- Feature flag rollout issue: #590939
Implementation details
-
EE override of
Ci::Build#featuresinee/app/models/ee/ci/build.rb— conditionally addsjob_telemetry: truewhenFeature.enabled?(:ci_job_telemetry, project) -
Beta feature flag
ci_job_telemetry— disabled by default, for gradual rollout - No changelog — change is behind a disabled-by-default feature flag
How to set up and validate locally
- Enable the feature flag for a project:
Feature.enable(:ci_job_telemetry, Project.find_by_full_path('your/project')) - Register a runner and request a job via the API or trigger a pipeline
- Verify the job payload includes
"features": { ..., "job_telemetry": true } - Disable the flag and verify
job_telemetryis absent from the response:Feature.disable(:ci_job_telemetry)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Pedro Pombeiro (OOO from July 6th-17th)