Add a toggle in the Enable merge trains section to Disable skip merge train

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

🧩 Problem statement

Right now, when users enable merge trains (after enabling merged results pipelines) is enabled, Merge immediately always shows up. In this case Merge Immediately does a normal merge by skipping the train, resulting in all the running MT pipelines getting disrupted. By adding an additional toggle, users would get an option if they want an option to merge immediately when merge trains are enabled, since a disruption to merge train pipelines could prove to be expensive in CI minutes and Wall Clock time.

Background

#320981 (comment 578018148)

📝 Proposal

  • Add an additional toggle in the Enable merge train section in the setting to allow users to configure if they only want the MR to be merged using a train.
  • Stretch - allow different roles to still skip the train and merge immediately.

  • Only allow merging via merge train

All merge requests must be added to a merge train to merge. The Merge immediately option is no longer available in merge requests


Proposed behaviour

  • Only allow merging via merge train

All merge requests must be added to a merge train to merge. The Merge immediately option is no longer available in merge requests.


  1. Merged Result pipeline is running 🏃 - Only 'Start the train' is shown.
  2. Merged Result pipeline passes - Only 'Start the train' is shown.
  3. Train is started and new pipeline is running 🏃 - no buttons
  4. Merged Result pipeline is running for MR 2 🏃 - Only 'Add to the train' is shown.
  5. Merged Result pipeline passes for MR 2 - Only 'Add to the train' is shown.
  6. MR is added to train and new pipeline is running for MR 2 🏃 - no buttons
  • Only allow merging via merge train

All merge requests must be added to a merge train to merge. The Merge immediately option is no longer available in merge requests.

  1. Merged Result pipeline is running 🏃 - Only 'Start the train' is shown.
  2. Merged Result pipeline passes - 'Start the train' and Skip merge train and merge is shown.
  3. Train is started and new pipeline is running 🏃 - no buttons
  4. Merged Result pipeline is running for MR 2 🏃 - Only 'Add to the train' is shown.
  5. Merged Result pipeline passes for MR 2 - Only 'Add to the train' is shown.
  6. MR is added to train and new pipeline is running for MR 2 🏃 - no buttons
Edited by 🤖 GitLab Bot 🤖