Skip to content

Return job failure reason in API responses

What does this MR do and why?

The Job entity now exposes a failure_reason field for failed jobs. This is useful when measuring reliability, to tell apart infra errors from script errors.

Fixes: #33552 (closed)

Screenshots or screen recordings

GETting https://<your gitlab instance>/api/v4/projects/1/jobs?scope[]=failed now returns the new field for failed jobs:

Screen_Shot_2021-11-19_at_14.14.18

MR acceptance checklist

Merge request reports