Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Produce proper exit status in case image has been built with timeout (a…
…pache#35282) When we build the image with timeout, we fork the process and set alarm and create a new process group in order to be sure that all the parallel build processes can be killed easily with sending termination signal to process group on timeout. In order to wait for the forked process to complete we used waitpid, but we did not handle the status code properly, so if the build failed, we returned with 0 exit code. This had the side effect that "Build CI image" did not fail, instead the next step (generating source providers failed instead and it was not obvious that the CI image build failing was the root cause. This PR properly retrieves the wait status and converts it to exit code - since we are still supporting Python 3.8 this is still done using a bit nasty set of if statements - only in Python 3.9 we have `os.waitstatus_to_exitcode` method to do it for us, but we cannot use the method yet.
- Loading branch information