Uh oh!
There was an error while loading. Please reload this page.
Produce proper exit status in case image has been built with timeout - #35282
Merged
Conversation
potiukforce-pushed
the
test-failing-composite-action
branch
2 times, most recently
from
October 30, 2023 20:51
1ce7ede to
b335391Comparepotiukforce-pushed
the
test-failing-composite-action
branch
10 times, most recently
from
October 31, 2023 02:01
127c56b to
07c5312Comparepotiuk
marked this pull request as ready for review
October 31, 2023 02:02
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.
potiukforce-pushed
the
test-failing-composite-action
branch
from
October 31, 2023 02:04
07c5312 to
2328bcfCompareeladkal
approved these changes
Oct 31, 2023
hussein-awala
approved these changes
Oct 31, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_exitcodemethod to do it for us, but we cannotuse the method yet.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.