Could not retrieve the pipeline status. For troubleshooting steps, read the documentation (GitLab CI)
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary This bug happens on the GitLab.com interface. We’re using Gitlab with Gitlab CI on a shared, free plan, with public workers. Our mode of operation is to encourage developers to work in Git branches and keep 1 merge request opened per branch, with it transitioning between MR open/close state during review iterations. We notice that after reopening a merge request, the Gitlab pipeline will run but the status is not reflected in the merge request view (main screen). ### Steps to reproduce Outlined in comment https://gitlab.com/gitlab-org/gitlab/-/issues/225710#note_675913518 ### What is the current *bug* behavior? GitLab does not show an accurate pipeline status to merge request page. We noticed that in a flow of: - Developer opened an MR “X” - Reviewer reviewed it, suggested changes, closed MR “X” - Developer pushes commits to address change requests - Developer waits to see a CI job to finish successfully (GitLab -> CI -> Pipelines tab and also GitLab -> Ci -> Jobs tab appear to show the right status for the most recently pushed commits) - Developer reopened MR “X” - Gitlab very often ends with this error message: “Could not retrieve the pipeline status. For troubleshooting steps, read the documentation”. - When we go to “Pipelines” for this MR, the pipeline status is correctly reflected. We noticed that this issue persists for very many hours. We noticed that the possible workaround is to push a commit when an MR is opened. For example, some MRs left opened, but later pre-merged with “master”, get out of this state. Leaving the merge request open overnight (and then pushing a few more commits to the branch) also solved the problem. ### What is the expected *correct* behavior? Should link the pipeline status (success/fail) to merge request page immediately, instead of needing to wait an excessive amount of time or having to push additional commits. ### Relevant logs and/or screenshots ![image](/uploads/f75a00c1262932fba1417698abb8e7e8/image.png) ``` Could not retrieve the pipeline status. For troubleshooting steps, read the documentation. ``` The documentation link points to [here](https://gitlab.com/help/user/project/merge_requests/reviewing_and_managing_merge_requests.md#troubleshooting). ### Proposal A `isPostMerge` MR is checking for `mr.ciStatus` which is `undefined` always and we return an error message to the user. We should add a handler for the CI status and return the status of a merge pipeline instead. `app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline_container.vue` ```js hasCIStatus() { return this.isPostMerge ? !isEmpty(this.mr.mergePipeline.details.status) : this.mr.ciStatus; }, ``` Also may need to make `app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue` prop `ciStatus` accept both `String` and `Boolean` types.
issue