Truncate exit codes larger than 32767
Compare changes
+ 5
− 1
@@ -197,7 +197,11 @@ class CommitStatus < Ci::ApplicationRecord
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)
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 are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
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)