Improve runner build failure reasons

Add ConfigurationError and ExitCodeInvalidConfi... (gitlab#514297 - closed) and Provide type of runner job failure (#37403 - closed) both request more resolition in build error FailureReasons. We actually have more resolution in runner than rails does, and we map the FailureReasons only known to runner to other FailureRreasons known to rails. To really address the above two issues, we need to add and handle the FailureReasons currently only in runner to rails; that will happen elsewhere...

Nonetheless, we can still do better in runner. I've audited all the places in runner where BuildErrors are specified, and checked to see if the FailuireReasons are appropriate. I found a number of places where they can be better. Note that these changes currently have no effect on the rails side since JobFailureReasons known only within runner are mapped to failure reasons recognized by rails. However, when these failure reasons are added to rails, and specifically to https://gitlab.com/gitlab-org/gitlab-runner/-/blob/a8fc0c8168fbaa263c2289076567dafa53524e19/common/failure_reason_mapper.go, runner will stop mapping them and pass them along to rails. In this way the relevant rails dev can add support for more fine-grained failure reasons at their leisure.

Best reviewed commit-at-a-time.

Edited by Axel von Bertoldi

Merge request reports

Loading