Show `failure_reason` in Job page
Owners
UX: @dimitrieh FE: @andr3 BE: @mayra
Description
When a job fails, we have no direct way to know which is the problem. The only option is to look at job details and read the output log, where we can possibly see some error message. In case the job failed for reasons that prevent an output log at all, we have no way to know about the error.
https://dev.gitlab.org/gitlab/gitlabhq/-/jobs/1778920
Since backend knows the reason of the failure, we should make it available also to users.
irb(main):009:0> Ci::Build.find(1779093).failure_reason
=> "missing_dependency_failure"
Proposal
When a job failed, show the failure_reason
text to users. This can be done in different places:
- job details window, in the sidebar
- job details window, in the main view when no output log is available
- as a tooltip for the
failed
badge - in the Failed Jobs tab in the CI/CD > Pipelines list
Sub issues
This issue has now been converted to a meta issue, as it has been divided up into three issues as per https://gitlab.com/gitlab-org/gitlab-ce/issues/41111#note_63271855
The order in which they are notated here should be the priority order in which they are finished.
-
https://gitlab.com/gitlab-org/gitlab-ce/issues/44269 Show failure_reason
and upgrade tooltips of jobs -
https://gitlab.com/gitlab-org/gitlab-ce/issues/44271 Show failure_reason
in jobs view content section -
https://gitlab.com/gitlab-org/gitlab-ce/issues/44267 Show failure_reason
and improve failed jobs tab in pipeline detail view