[ 
https://issues.apache.org/jira/browse/HBASE-28864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883956#comment-17883956
 ] 

Andrew Kyle Purtell edited comment on HBASE-28864 at 9/23/24 4:54 PM:
----------------------------------------------------------------------

Locally, we are using the same versions as branch-2 for jruby (9.4.8.0), joni 
(2.2.1), and jcodings (1.0.58).

I diffed our local hbase-shell module compared to upstream branch-2 and these 
are the only differences:
 - We are compiling with the Hadoop 3 profile

 - Building against Hadoop 3.3.6

 - An unrelated change in admin.rb where we do not have the 
setErasureCodingPolicy support (because it's based on branch-2.5)

 - These commands are not included because they aren't supported in 2.5 so we 
don't want to backport them, also unrelated, as they are not touching 
irb/hirb.rb
 -- list_enabled_tables
 -- list_disabled_tables
 -- truncate_region
 -- peer_modification_enabled
 -- peer_modification_switch

The rest of the code is the same. I can see no explanation why the local change 
is needed, but if I do not define assignment_expression in our hirb.rb, then 
this happens:
{noformat}
hbase:001:0> list
TABLE                                                                           
                                                                                
              
0 row(s)
Took 0.4398 seconds                                                             
                                                                                
              
Traceback (most recent call last):
NoMethodError (undefined method `assignment_expression?' for 
#<IRB::HIRB:0x2cea921a>)
Maybe IRB bug!{noformat}
and any other shell command experiences the same.

The OS / environment for testing is Linux CentOS 9 Stream, either aarch64 or 
x86_64, and Java 8, because at least for now our runtime is still stuck there, 
although we will be up to 17 by the end of the year. Maybe the Java version is 
somehow relevant. 


was (Author: apurtell):
Locally, we are using the same versions as branch-2 for jruby (9.4.8.0), joni 
(2.2.1), and jcodings (1.0.58).

I diffed our local hbase-shell module compared to upstream branch-2 and these 
are the only differences:
 - We are compiling with the Hadoop 3 profile

 - Building against Hadoop 3.3.6

 - An unrelated change in admin.rb where we do not have the 
setErasureCodingPolicy support (because it's based on branch-2.5)

 - These commands are not included because they aren't supported in 2.5 so we 
don't want to backport them, also unrelated, as they are not touching 
irb/hirb.rb
 -- list_enabled_tables
 -- list_disabled_tables
 -- truncate_region
 -- peer_modification_enabled
 -- peer_modification_switch

The rest of the code is the same. I can see no explanation why the local change 
is needed, but if I do not define assignment_expression in our hirb.rb, then 
this happens:
{noformat}
hbase:001:0> list
TABLE                                                                           
                                                                                
              
0 row(s)
Took 0.4398 seconds                                                             
                                                                                
              
Traceback (most recent call last):
NoMethodError (undefined method `assignment_expression?' for 
#<IRB::HIRB:0x2cea921a>)
Maybe IRB bug!{noformat}
and any other shell command experiences the same.

> NoMethodError undefined method assignment_expression?
> -----------------------------------------------------
>
>                 Key: HBASE-28864
>                 URL: https://issues.apache.org/jira/browse/HBASE-28864
>             Project: HBase
>          Issue Type: Bug
>          Components: shell
>    Affects Versions: 3.0.0-beta-1, 4.0.0-alpha-1, 2.7.0
>            Reporter: Andrew Kyle Purtell
>            Assignee: Andrew Kyle Purtell
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.0.0-alpha-1, 2.7.0, 3.0.0-beta-2
>
>
> After HBASE-28250 Bump jruby to 9.4.8.0 to fix snakeyaml CVE after every 
> command the message "NoMethodError undefined method assignment_expression?" 
> is printed. 
> This is called from code copied from 
> https://github.com/ruby/irb/blob/v1.4.2/lib/irb.rb . The fix is to also copy 
> over the definition of `assignment_expression`. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to