Misleading message displays when MR request is first submitted
Problem to solve
After submitting an MR, the page temporarily displays the following message until the pipeline begins running:
After the pipeline begins running, the merge button displays as expected.
This interaction is disorienting, because there are no items to resolve and it causes the user to believe that there is action to be taken when there is not.
Possible Solutions
- Don't display a message at all, since the interim state persists for a short time. Just load the merge widget when it's available.
- Update the message to accurately reflect that the MR is waiting for the pipeline to begin running.
The current short term solution is to create a message that is less misleading. There is an open MR: !34958 (merged) and so far, the message would be: A CI/CD pipeline must run and be successful before merge. (?) where the ? leads to the documentation on Pipelines must succeed this would be less confusing to user.
The second step will be to add a loading state to this widget. Because we cannot determine if a pipeline is being created or if there is just no pipeline, we can add a loading time of X amount (say 1 minute) where we tell our user we are checking status of their pipeline. If it get created under the required time, they see the normal pipeline widget (so they skipped the error message altogether). If it doesn't, they see the new message A CI/CD pipeline must run and be successful before merge. (?) .
The long term solution would be more in line with exposing more data to the FE about the current state of the project so that we can give meaningful, accurate message for all states, but this is far off in time due to complexity on the API side.
Proposal
Because the problem to solve is a scenario when a pipeline exists and there is a brief delay until it starts running, the proposed remedy is to replace the existing misleading message You can only merge once the items above are resolved
with a generic message to prevent the perception of a error that requires further action.
Possible copy for generic message:
- Waiting for pipeline to start...
- Checking ability to merge automatically...
Expand here for previous Proposal which is de-scoped from this issue and deferred to later iteration in #225609 (closed)
Display a specific message near the “Merge” button if the Pipelines must succeed merge check is enabled.
On page load | “Pipelines must succeed” enabled and pipeline hasn't started or finished | “Pipelines must succeed” enabled and pipeline has failed | “Pipelines must succeed” disabled |
---|---|---|---|
Show Merge When Pipeline Succeeds button enabled. | Per the documentation, we already show this state. | Merge button should be enabled regardless of pipeline status, but we need to check whether that’s the case today. |
Additional context
This is happening on every single MR and it happens because we have the option Pipelines Must succeed turned on, and the pipeline for the MR is not yet processed. When the MR is created, this goes back to normal. Some time after this issue was created, we had worked on improving a different state: when a user had Pipeline Must Succeed turned on, but was using no internal or external CI. The message was too generic, so we added a message for that state which said: Pipelines must succeed for merge requests to be eligible to merge. Please enable pipelines for this project to continue. For more information, see the documentation. This message was supposed to only appear when a user had no CI config, but we realized afterwards that if an MR has no pipeline, even if there is a CI configuration, we cannot make the difference which mean that currently, this is the message people are seeing when creating a MR on gitlab.com.