Skip to content

Only allow failures with exit code 99 in Linux tests

Pedro Pombeiro requested to merge 27474-allow_failure_exit_code_1 into main

What does this MR do?

It leverages the new allow_failures:exit_codes functionality in GitLab Runner 13.8 in order to narrow down the types of failures that will be allowed.

We need to return a well-known exit code from the scripts that run tests (in this case 99) and only accept that error code (or success). Anything else (like a timeout) should cause the job to fail.

Why was this MR needed?

Currently, a system failure like a timeout will be allowed (and therefore considered as a "good" build), which is not right.

What's the best way to test this MR?

Check if the Linux race unit tests still pass. I guess we'll need to keep an eye open to see if there are other error codes that will need to be allowed, but so far it doesn't seem so.

Returning exit code 99 from tests

https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/1367722532 passes with an orange badge

Returning exit code 222 from tests

https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/1367741810 fails with a red badge

Returning exit code 99 from tests, only accepting exit code 99, timeout expired

https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/1367741818 fails with a red badge

What are the relevant issue numbers?

Part of #27474 (closed)

Edited by Pedro Pombeiro

Merge request reports