Set a fail status to a timed out job

Hi! I have a job with timeout_in_minutes parameter set Command step | Buildkite Documentation
Sometimes it does timeouts but I don’t want developers to think that it is passed and would rather want to restart it.
Is it possible to make a job exit with non-zero if it has timed out? Or I have to invent my own “time out” that will exit with 1?

Hey @goncharov

Thanks for reaching out!

Previously, the build would consider a timed out job as “failed”, regardless of its exit status. We made change to our system about 3 years ago, that if the job time out happens when the step is about to finish (pass) we return an exit status 0

Because the jobs can time out at the same exact moment that the job was completed and supposed to gracefully exit. However if the timeout is due to a Signal Interruption, then it would state that clearly in the logs. For your Build, if you increase the Timeout, it should work fine!

Hope this helps !
Cheers
Stephanie