HBASE-26741 Incorrect exception handling in shell#4101
HBASE-26741 Incorrect exception handling in shell#4101petersomogyi merged 3 commits intoapache:masterfrom
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. |
joshelser
left a comment
There was a problem hiding this comment.
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 <matz@netlab.jp>.
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 <josh.elser@gmail.com>
|
🎊 +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. |
joshelser
left a comment
There was a problem hiding this comment.
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 <elserj@apache.org>
Override eval_input in HIRB to modify exception handling logic. Signed-off-by: Josh Elser <elserj@apache.org>
Override eval_input in HIRB to modify exception handling logic. Signed-off-by: Josh Elser <elserj@apache.org>
Override eval_input in HIRB to modify exception handling logic. Signed-off-by: Josh Elser <elserj@apache.org> (cherry picked from commit 3994374) Change-Id: Ifa97cbbe6a53c7f0ccece36ebb66c6a91b844088
Override eval_input in HIRB to modify exception handling logic.