Draft: Remove the track_ref_pipeline_creation feature flag

What does this MR do and why?

Removes the track_ref_pipeline_creation feature flag and keeps the behaviour it gated: a push records a pipeline creation request for each branch it updates, and the merge checks treat the merge request as "pipeline creating" until that request is completed. Auto-merge therefore waits for the branch pipeline instead of merging before it exists, which is the bug in #595420.

The flag was rolled out on GitLab.com per #597220: test project, gitlab-org/gitlab, 10%, 50%, then enabled globally on 2026-11-05. The checks on the rollout issue stayed flat at every step.

Changes:

  • PostReceiveService#prepare_pipeline_creation_requests always records the requests (project repositories only, up to git_push_pipeline_limit, skipped when the project skips branch pipelines for merge requests).
  • MergeRequest#pipeline_creating_for_source_ref? always reads them.
  • Ci::CreatePipelineService always leaves a ref request for MergeRequests::UpdateHeadPipelineWorker to complete after the head pipeline is updated.
  • The flag definition is deleted and the specs lose their flag-off contexts.

Zero-downtime upgrades: this lands in 19.7 so that every node already runs 19.6, which carries the Sidekiq argument shape and event schema from !256819 (merged) that the request handling relies on. A 19.5 node does not have them, which is why the flag stays off by default through 19.6. Between 19.6 and 19.7 nodes, the flag gated a Redis write and its completion path. A push handled by a node without this change records no request, so that merge request behaves as it did before the change. A request recorded by a new node and handled by an old one is completed by the old code when the pipeline is created, and anything left behind expires after 300 seconds. Nothing in the mixed state can merge earlier than the pre-change code did.

References

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

  1. In a project with a .gitlab-ci.yml whose job runs for a minute or so, leave "Pipelines must succeed" off.
  2. Push a new branch with git push -o merge_request.create -o merge_request.auto_merge origin <branch>.
  3. The merge request shows auto-merge set and waits, then merges once the pipeline passes. Before this change, the same push merged immediately with no pipeline.

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 Peter Gumeson

Merge request reports

Loading
Loading