Merge Request becomes unactionable after failed MergeTrain Pipeline

The Problem

Screenshot_2024-07-25_at_15.22.37

How To Recreate The Problem

  1. Do the maintainer review on an MR for gitlab-org/gitlab with MergeTrains enabled (which is the case, as of this writing 25 July 2024 15:28 EDT)
  2. Decide the MR is fine, see that CI has successfully finished recently.
  3. Click Approve
  4. Click Merge
  5. The Merge Train pipeline fails, because by the time it has started, the robots have kicked off an approval-based Pipeline that was created and began running before the first job in the MergeTrain pipeline started running, which fails because the robots approval-based pipeline is running, not successful. This is possible because our Pipelines take so long to create.
  6. The merge widget remains dedicated to the MergeTrain pipeline, which is failed, but the MR is still in some kind of merge-pending state so there are no actions to take. The Pipelines:

Screenshot_2024-07-25_at_15.22.52

What To Do About The Problem

At this point, the merge widget isn't really giving me any information about the state of my MR and what, if anything, is going to happen automatically. When the MergeTrain pipeline failed, I expect the MR gets kicked off the MergeTrain. At that point I would also expect that:

  1. The now-running pipeline (robot-created approval-based one) shows up in the widget, because it is what's happening, despite being created prior to the failed one.
  2. I'm given ATMTWPS as a merge option, because CI is running and my MR is no longer on the train (or is it?)

More Details

I did see the event in the MR history indicating that the MR is not on the MergeTrain:

image

Given that, it seems like we need to refresh the CI & merge widgets

Edited by drew stachon