[SPARK-55404][PYTHON] Always raise KeyboardInterrupt from SIGINT handler#54187
Open
gaogaotiantian wants to merge 1 commit intoapache:masterfrom
Open
[SPARK-55404][PYTHON] Always raise KeyboardInterrupt from SIGINT handler#54187gaogaotiantian wants to merge 1 commit intoapache:masterfrom
gaogaotiantian wants to merge 1 commit intoapache:masterfrom
Conversation
JIRA Issue Information=== Bug SPARK-55404 === This comment was automatically generated by GitHub Actions |
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 free
to 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.
What changes were proposed in this pull request?
In SIGINT handler, even if
cancelAllJobs()raised an exception, we should keep raising KeyboardInterrupt()Why are the changes needed?
We should make sure users can Ctrl+C out of the program.
self.cancelAllJobs()can raise an exception (for example,self._jscmight beNoneat that point and it could raise anAttributeError).KeyboardInterrupt()is aBaseExceptioninstead ofExceptionjust to make sure it can propagate through a lot ofExceptioncatch check. This makes sure that in most cases our users can send a SIGINT and get out of the program.Does this PR introduce any user-facing change?
Well yes they can Ctrl+C out now - but it should not be a big deal, more like a bug fix.
How was this patch tested?
CI should pass.
Was this patch authored or co-authored using generative AI tooling?
No.