Skip to content

Truncate exit codes larger than 32767

Max Fan requested to merge 456982-truncate-exit-code into master

What does this MR do and why?

Truncate/wraparound exit codes larger than 255

We have some (window) runners that return any exit code Other runners will only return 0..255 exit codes

This change will truncate exit codes greater than what ci_builds_metadata can handle (smallint - 32767)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Not easy to test fully locally, using mac/linux runners will return an exit code of 255 or less. This is using both script: - exit 500 on gitlab ci_yml as well as trigging bash/ruby scripts to exit.

But it's easy to test the method directly via build.drop_with_exit_code!(:script_failure, 500)

Related to #456982 (closed)

Edited by Max Fan

Merge request reports