Copilot commented on code in PR #8461:
URL: https://github.com/apache/hbase/pull/8461#discussion_r3551019861
##########
hbase-shell/src/main/ruby/shell/commands/list_labels.rb:
##########
@@ -33,9 +33,13 @@ def help
def command(regex = '.*')
list = visibility_labels_admin.list_labels(regex)
+ labels = []
list.each do |label|
-
formatter.row([org.apache.hadoop.hbase.util.Bytes.toStringBinary(label.toByteArray)])
+ label_string =
org.apache.hadoop.hbase.util.Bytes.toStringBinary(label.toByteArray)
+ formatter.row([label_string])
+ labels << label_string
end
+ labels
Review Comment:
The command now changes its return value from the raw Java/protobuf label
list to an Array of Ruby Strings (label_string). There are existing cluster
tests for other visibility label shell commands, but none currently cover
list_labels; adding a test would protect this return-type/contents change
(e.g., create a label, wait until available, then assert command(:list_labels,
'TEST_.*') includes the label and that returned elements are String).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]