Update CI bridge status label to use core label as fallback
What does this MR do and why?
This MR addresses the bug described in #390377 (closed). Basically, an error occurs upon fetching the pipeline's job list after a Trigger job has been retried. The fetch is initiated when you view the Jobs tab in the Pipeline view.
The error happens because @status.status_tooltip
is producing a nil value at the time of calling, which raises an undefined method '+' for nil:NilClass
exception.
In this context, @status.status_tooltip
gets its value from the label
method. This MR updates Ci::Status::Bridge::Common.label
so that it uses the core status' label value if the bridge description is nil.
How to reproduce the error
- Enable
ci_recreate_downstream_pipeline
Feature.enable(:ci_recreate_downstream_pipeline)
- Update
.gitlab-ci.yml
with a trigger job config. Sample config file :
trigger_job:
stage: build
trigger: 'group-a/project-6'
-
Run the pipeline.
-
In the Pipeline View, click the retry button on the trigger job.
-
After the job is retried, go to the "Jobs" tab, refresh the page and you will see the following:
How to set up and validate locally
- Follow steps 1-5 above and observe that the error no longer occurs. The jobs tab populates as expected. (Note that a page refresh is not required when the bug is fixed; the jobs list updates dynamically.)
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 #390377 (closed)