Allow MR to merge when pipeline is blocked and "pipeline must succeed" is not enabled
The following page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
Problem to solve
An MR should be allowed to merge when a pipeline is blocked (waiting for a manual job to run) if the "pipeline must succeed" option is not enabled. There is a bug that prevents this expected behavior from working correctly.
As described in CI engineer's comment, the bug is the backend code correctly resolves that a blocked pipeline is mergeable (when "pipeline must succeed" is not enabled) but the frontend code does not rely on the backend value and independently (and conflictingly) resolves that the pipeline is not mergeable.
Original issue text, click to expand
Currently, it isn't possible to merge a MR when the pipeline is blocked waiting for a manual action, regardless of the project policy regarding merges and pipeline failures. Such block can occur if there is an action with both when: manual
and allow_failure: false
.
While I agree that a proper pipeline shouldn't be in this position in the first place, it still feels odd that we would be able to merge if the pipeline has failed, but not if it is blocked. A user of mine testing CI was quite surprised when it happened to them.
Repro project:
Intended users
User experience goal
The Merge
button should be enabled to allow user to merge an MR when these 2 conditions exist:
- pipeline is blocked waiting for a manual job to run
-
pipeline must succeed
option is not enabled
Proposal
Update the frontend code to rely on the backend code for evaluating/resolving whether a pipeline is mergeable or not mergeable.
Further details
This issue is converted from a feature request to a ~bug issue because the problem as originally reported (details in "Original issue text, click to expand" above) is caused by the disconnect between frontend and backend code.
Out of scope for this issue is solving for a separate use case of when "pipeline must succeed" option is enabled.
Documentation
Availability & Testing
- Unit test changes - Required, please add/refactor unit tests accordingly with the feature development
- End-to-end test change - Yes, there is potentials for a new E2E test, please see proposed test case gitlab-org/quality/testcases#971 (closed)
See the test engineering planning process and reach out to your counterpart Software Engineer in Test for assistance.