Automatic update of MR target branch does not recognize pipeline status

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

GitLab version 17.11.3

A Merge Request (MR) cannot be merged because the status of the pipeline cannot be resolved.

Reproducible as follows:

  1. Create a feature-test-MR based on a develop-branch
  2. make changes to the feature-branch
  3. A build is automatically triggered in Jenkins (our CI server)
  4. Create an MR with source branch feature-test-MR and target branch develop (in the MR, the pipeline is shown as successful)
  5. Create another feature-test-MR2 branch based on feature-test-MR
  6. make changes to this branch
  7. Again a successful build in Jenkins
  8. Create a MR with source branch feature-test-MR2 and target branch feature-test-MR (in the MR, the pipeline is shown as successful)
  9. Now, merge the MR from bullet 4 (do note that 'deleted source branch after merge' is checked)
  10. The merge causes a change in the target branch of bullet 8, it is automatically changed from feature-test-MR into develop.
  11. A warning is shown: You should run a new pipeline, because the target branch has changed for this merge request.
  12. Rebuild the jenkinsbuild for branch feature-test-MR2, but this does not change this warning. The successful pipeline is visible in the pipelines of the MR.

The warning. gitlab-issue-warning

The automatic change of target branch gitlab-automatic-change-of-target-branch

The successful rebuild of the pipeline gitlab-successful-pipeline

We have pipeline checks enabled for the Merge Request. The only way to merge this MR is to ask an admin to disable the pipeline checks, merge the MR, and to enable the checks again. This causes a lot of work.

Edited by 🤖 GitLab Bot 🤖