Skip to content

Add supported failure reasons for build errors

What does this MR do?

The failure reasons for a build error are likely to change over time. However, these failure reasons also need to be supported by the GitLab instance they're sent to.

Because Runner and GitLab versions can be mismatched, a common set of failure reasons need to be established.

This MR implements filtering for supported failure reasons. It combines widely accepted failure reasons (reasons we know all GitLab versions support) with the supported version GitLab advertises. If the failure reason is not in this list, it falls back to the failure reason UnknownFailure.

Why was this MR needed?

We've been accidentally sending GitLab unsupported failure reasons.

What's the best way to test this MR?

Run the test TestBuild_setTraceStatus. This test checks the behaviour for when GitLab does, or does not, send a list of failure reasons.

What are the relevant issue numbers?

Closes #27449 (closed)

Edited by Arran Walker

Merge request reports