Fix post merge CI status bug [RUN AS-IF-FOSS]
What does this MR do and why?
This MR fixes a problem with post merge MR's where a pipeline error message is showing even though a pipeline exists.
The bug comes from this block of code in app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
hasCIError() {
return this.hasPipeline && !this.ciStatus;
},
A post merge pipeline does not have the pipeline
object. It has a mergePipeline
object and will never have ciStatus
from my testing.
See my proposed solution in the diffs of adding a handler on post merge.
Related to: #225710 (closed)
Screenshots or screen recordings
Post merge before and after. Take note of the pipeline error state before and after.
before | after |
---|---|
How to set up and validate locally
- Setup
.gitlab-ci.yml
file
image: busybox:latest
build:
stage: build
script:
- echo "Do your build here"
only:
- main
- Create a new MR
- Merge the MR
- Ensure pipeline status is shown in MR and not the error message
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #225710 (closed)
Edited by Payton Burdette