Allow users to re-add an MR to a train with one click
Release notes
Problem to solve
There are two separate but related problems.
- Removed/Dropped Train MR #429263 (closed)
- Flow: When an MR gets removed/dropped before finishing and the 'merge/add to train' button is there.
- Problem: The messaging around why it is dropped is only a 'system note' and not always noticeable or even on the screen.
- Failed Pipeline for Train MR (This Issue)
- Flow: When the pipeline finishes with a failure and the user has to retry to be able to click auto-merge.
- Problem: lots of manual steps and messaging around what to do could be overlooked.
Intended users
User experience goal
Re-adding an MR to a train should not involve multiple step action.
Proposal
Background
From @drew's illustration: The problem is that we treat Merge Train and Merge Request Pipelines as "head pipeline" with no differentiation when we check mergability. You can only add to Merge Train by clicking Merge, and you can only click Merge if the most recent CI passed. This makes no sense for Merge Train failures, as passing ones have already been merged.
For merge trains, we currently show the label as Merge
. Change that to Set to auto-merge
like for other auto-merge strategies.
Solution
To make progress on this issue faster, we're narrowing the scope a bit. We're now only looking at specific use case: When Merge train pipeline has failed[recently], merge train is active and Pipeline must succeed is selected.
In that case, when merge train pipeline fails, users again see an option to Merge
if the branch pipeline has succeeded. if the branch pipeline ran not too long ago, the MR should be directly added to the end of the train. Else, the branch pipeline will restart and will add the MR to the end of the train once that succeeds.