-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-24929][INFRA] Make merge script don't swallow KeyboardInterrupt #21880
Conversation
cc @squito |
Test build #93593 has finished for PR 21880 at commit
|
Test build #93591 has finished for PR 21880 at commit
|
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, thanks for catching this. A small suggestion on handling the keyboard interrupt, but fine for me either way
lgtm
dev/merge_spark_pr.py
Outdated
@@ -331,6 +331,9 @@ def choose_jira_assignee(issue, asf_jira): | |||
assignee = asf_jira.user(raw_assignee) | |||
asf_jira.assign_issue(issue.key, assignee.key) | |||
return assignee | |||
except KeyboardInterrupt: | |||
traceback.print_exc() | |||
sys.exit(-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason to do this, rather than just
except KeyboardInterrupt:
raise
except:
...
? That seems to do the right thing in a small test I tried, letting you break out of the loop:
while True:
try:
x = raw_input("enter a number: \n")
print int(x)
except KeyboardInterrupt:
raise
except:
print "oops, entered " + x
sys.exit
makes it impossible for an wrapping function to do its own handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope. I don't have a special reason for it - just found that's used in this script and thought it's better to make sure exiting. The root exception handling already catches all the exceptions and looks the exception is being handled for now.
But yup let me change and test it in other PRs or this PR :-). not a big deal.
Test build #93598 has finished for PR 21880 at commit
|
Test build #93600 has finished for PR 21880 at commit
|
Manually tested. Merged to master. |
Thanks @squito. |
What changes were proposed in this pull request?
If you want to get out of the loop to assign JIRA's user by command+c (KeyboardInterrupt), I am unable to get out. I faced this problem when the user doesn't have a contributor role and I just wanted to cancel and manually take an action to the JIRA.
Before:
After:
How was this patch tested?
I tested this manually (I use my own merging script with few fixes).