Backend: "allow_failure" status on multi-project pipeline
Not sure if this is a bug, or more of a "feature request"...
When allow_failure
is set to true
on a job that triggers a multi-project pipeline, which fails, I would expect the UI to display this failure in a similar way to a "regular" job that has allow_failure
set. Currently, if allow_failure
is set, and the downstream pipeline is the only thing that fails, the status of the pipeline is shown as a green "passed", and the stage has a green check-mark, despite a job having failed.
This is not what I would expect, as a regular job with allow_failure
set would display a yellow warning status indicating that parts of the pipeline have failed.
This is on a self-hosted GitLab instance, 12.9.2-ee (0ad76f4d).
Examples:
Failed downstream pipeline showing green passed:
Adding another failing job with allow_failure
set, for comparison (I would expect the above job to display this same status):
The top job has a failing downstream pipeline, but this is not apparent from the UI:
Upstream CI config:
downstream:
trigger:
project: cameron/downstream
strategy: depend
allow_failure: true
.fail:
script:
- 'false'
allow_failure: true
Downstream CI config:
fail:
script:
- 'false'
Technical details
we already mark the failing bridge jobs "passed-with-warning" in a hidden way. It doesn't display on the job but it displays on the stage and pipeline status. So, what we can do here is to fix this behavior by making some changes on lib/gitlab/ci/status/bridge/factory.rb
related files.