Skip to content

Add a confirmation modal for adding to merge train when last pipeline failed

🧩 Problem

In #35917 (closed) we added a danger variant treatment to the start merge train / Add to merge train button when last pipeline has failed.

For any danger actions associated with merge, we present a confirmation modal to users, and similar experience should be provided here as well.

📝 Design proposal

  • Present users with a confirmation modal when they click on the start merge train / Add to merge train button

Start-merge-train-confirmation__1_

🧪 Availability & Testing

Unit Tests

As always, let's make sure we have good coverage for changes we're introducing/updating here.

Integration Tests

Let's introduce an integration test that validates the following:

  • If there's no ongoing merge train,
    1. the modal shows a button with the "Start train" label.
    2. clicking on "Start train" will start a pipeline build for this MR.
  • If there's an ongoing merge train,
    1. the modal shows a button with the "Add to train" label.
    2. clicking on "Add to train" will start a pipeline build for this MR + all other MRs already in the train.

This will make sure that we're able to fetch the current status of the merge train (whether one is ongoing or not) in order to display the correct button label and also makes sure the button actually does start a build.

End-to-End Tests

I don't see a need for us to introduce an E2E test for this as the call being made to start the merge train is the same call we're making to a happy path case when the pipeline is passing and a user wants to start or add to a merge train.

Edited by Richard Chong