-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-26741 Incorrect exception handling in shell #4101
Conversation
Override eval_input in HIRB to modify exception handling logic.
where's the specific line this is copied from? we'll need to attribute and update LICENSE info. |
what does this behavior look like during the default interactive mode? |
Copied this method with a single line change: https://github.com/jruby/jruby/blob/9.2.13.0/lib/ruby/stdlib/irb.rb#L440-L537 |
|
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
non-interactive mode with exception:
non-interactive without exceptions and non-zero exit code:
|
🎊 +1 overall
This message was automatically generated. |
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.
I would love to see the comment expanded and a unit test to cover this, too.
JRuby appears to be 2-clause bsd (assuming BSDL is not unique to the standard BSD license...)
JRuby distributes some ruby modules which are distributed under Ruby
license:
Ruby is copyrighted free software by Yukihiro Matsumoto <[email protected]>.
You can redistribute it and/or modify it under either the terms of the
2-clause BSDL (see the file BSDL), or the conditions below:
...
Co-authored-by: Josh Elser <[email protected]>
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
The irb.rb file (and the duplicated method) is originally from Ruby and not JRuby: https://github.com/ruby/irb/blob/9d7ba836eb1ec8ec71b6a24e9683ba96fe3fb72b/lib/irb.rb#L441-L537 This repository is using BSD 2-Clause which is a Category A license by ASF policies: https://www.apache.org/legal/resolved.html#category-a
I'm not yet sure how to do that. We have existing tests for shell command execution throwing exception in non-interactive mode but these tests don't use IRB.run underneath. |
Manual testing shows these results, matching the behavior of HBase 2.2.7.
|
🎊 +1 overall
This message was automatically generated. |
what happens to stuff that comes from stdin in non-interactive mode? (in 2.2 and with this patch) |
The behavior is identical. Both quits on exceptions with exit code 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.
This is breaking stuff downstream that we'd like to get fixed (sadly, urgently), so I'm +1 to fix the immediate problem and then follow-up a unit-test to codify the expected functionality.
Shout if you're not OK with that @busbey
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Override eval_input in HIRB to modify exception handling logic. Signed-off-by: Josh Elser <[email protected]>
Override eval_input in HIRB to modify exception handling logic. Signed-off-by: Josh Elser <[email protected]>
Override eval_input in HIRB to modify exception handling logic. Signed-off-by: Josh Elser <[email protected]>
Override eval_input in HIRB to modify exception handling logic. Signed-off-by: Josh Elser <[email protected]> (cherry picked from commit 3994374) Change-Id: Ifa97cbbe6a53c7f0ccece36ebb66c6a91b844088
Override eval_input in HIRB to modify exception handling logic.