doc/ci/pipelines/mr_pipeline_troubleshooting.md
{{< details >}}
{{< /details >}}
When working with merge request pipelines, you might encounter the following issues.
If you get duplicate pipelines in merge requests, your pipeline might be configured to run for both branches and merge requests at the same time. Adjust your pipeline configuration to avoid duplicate pipelines.
You can add workflow:rules to switch from branch pipelines to merge request pipelines.
After a merge request is open on the branch, the pipeline switches to a merge request pipeline.
If you push an invalid CI/CD configuration to a merge request's branch, two failed pipelines appear in the pipelines tab. One pipeline is a failed branch pipeline, the other is a failed merge request pipeline.
When the configuration syntax is fixed, no further failed pipelines should appear. To find and fix the configuration problem, you can use:
It's possible to have both branch pipelines and merge request pipelines in the Pipelines tab of a single merge request. This might be by configuration, or by accident.
When the project has Pipelines must succeed enabled and both pipelines types are present, the merge request pipelines are checked, not the branch pipelines.
Therefore, the MR pipeline result is marked as unsuccessful if the merge request pipeline fails, independently of the branch pipeline result.
However:
This bug is tracked on issue 384927.
An error occurred while trying to run a new pipeline for this merge request.This error can happen when you select Run pipeline in a merge request, but the project does not have merge request pipelines enabled anymore.
Some possible reasons for this error message:
The project does not have merge request pipelines enabled, has no pipelines listed in the Pipelines tab, and you select Run pipelines.
The project used to have merge request pipelines enabled, but the configuration was removed. For example:
.gitlab-ci.yml configuration
file when the merge request is created..gitlab-ci.yml file is changed to remove the merge request pipelines configuration.If Run pipeline is available, but the project does not have merge request pipelines enabled, do not use this option. You can push a commit or rebase the branch to trigger new branch pipelines.
Merge blocked: pipeline must succeed. Push a new commit that fixes the failure messageThis message is shown if the merge request pipeline, merged results pipeline, or merge train pipeline has failed or been canceled. This does not happen when a branch pipeline fails.
If a merge request pipeline or a merged results pipeline was canceled or failed, you can:
If the merge train pipeline has failed, you can:
/merge quick action to immediately add the merge request to the train again.If the merge train pipeline was canceled before the merge request was merged, without a failure, you can: