Merge Request blocked due to non-existent Pipeline
Summary
When a Merge Request requires a successful Pipeline, it is blocked when no Pipeline is available for this branch (e.g. Pipeline is only enabled for main).
Steps to reproduce
- Create a project with the following
.gitlab-ci.yml:
image: alpine:3
snapshot:
stage: build
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pipeline disabled on all branches except main
script:
- echo "Hello, World"
-
Go to project settings > Merge Requests and set "Pipelines must succeed":
-
Create a new branch with changes and a Merge Request.
Example Project
https://gitlab.com/luuz/blocked-pipeline-test/
What is the current bug behavior?
The Merge Request is blocked due to the Pipeline, as you can see here: luuz/blocked-pipeline-test!1
There actually is no Pipeline.
What is the expected correct behavior?
The Merge Request should not be blocked.
Relevant logs and/or screenshots
See screenshots above.
This problem happens on gitlab.com and I verified it on two different self-hosted instances.
Possible fixes
Disable "Pipelines must succeed".


