scylladb / scylla-tools-java

Apache Cassandra, supplying tools for Scylla
Apache License 2.0
53 stars 85 forks source link

build.xml: update io.airlift to 0.9 #375

Closed tchaikov closed 10 months ago

tchaikov commented 10 months ago

43427dfa introduced a regression, which moved guava v18 from the feet of io.airlift v0.6, which depends on guava 12.0, see https://mvnrepository.com/artifact/io.airlift/airline/0.6. actually, it is using an API -- com.google.common.base.Objects.firstNonNull, which was removed in guava 32.1.3, See https://guava.dev/releases/19.0/api/docs/com/google/common/base/Objects.html that's why we have runtime failure like:

ccmlib.node.ToolError: Subprocess /jenkins/workspace/scylla-master/dtest-release/scylla/.ccm/scylla-repository/61395a3658acbe786928090913b047373cea21fa/share/cassandra/bin/nodetool -h 127.0.60.1 -p 7199 -Dcom.sun.jndi.rmiURLParsing=legacy help exited with non-zero status; exit status: 2;
stderr: error: 'java.lang.Object com.google.common.base.Objects.firstNonNull(java.lang.Object, java.lang.Object)'
-- StackTrace --
java.lang.NoSuchMethodError: 'java.lang.Object com.google.common.base.Objects.firstNonNull(java.lang.Object, java.lang.Object)'
    at io.airlift.command.GlobalUsageSummary$2.apply(GlobalUsageSummary.java:100)
    at io.airlift.command.GlobalUsageSummary$2.apply(GlobalUsageSummary.java:97)
    at com.google.common.collect.Iterators$6.transform(Iterators.java:829)
    at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52)
    at io.airlift.command.UsagePrinter.appendTable(UsagePrinter.java:57)
    at io.airlift.command.GlobalUsageSummary.usage(GlobalUsageSummary.java:96)
    at io.airlift.command.GlobalUsageSummary.usage(GlobalUsageSummary.java:52)
    at io.airlift.command.Help.help(Help.java:57)
    at io.airlift.command.Help.help(Help.java:50)
    at io.airlift.command.Help.run(Help.java:25)
    at org.apache.cassandra.tools.NodeTool$CassHelp.run(NodeTool.java:257)
    at org.apache.cassandra.tools.NodeTool.execute(NodeTool.java:196)
    at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:62)`

when running nodetool.

fortunately, io.airlift/airline switched to another method in https://github.com/airlift/airline/commit/6e57ed2512fc3660e040b226bb1716b190fe3914, which was included by io.airlift 0.8 and up. Cassandra upstream is using io.airlift 0.8. that's why it's is also free from this problem even it has updated its guava to 32.0.1-jre in 992ad25b9608e59903dea4ec8becc00efbff5340.

so, in this change, we update io.airlift to 0.9, which is the latest release of this library.

Fixes #374 Signed-off-by: Kefu Chai kefu.chai@scylladb.com

tchaikov commented 10 months ago

being tested at https://github.com/scylladb/scylladb/pull/16724

yaronkaikov commented 10 months ago

@tchaikov If I am not mistaken the failing test is not running through CI. Did you verify it's passing now locally ?

tchaikov commented 10 months ago

@tchaikov If I am not mistaken the failing test is not running through CI. Did you verify it's passing now locally ?

sorry i forgot to mention, i verified the change also using

$ reloc/build_reloc.sh --version scylla-5.5.0~dev-0.20240111.8b02583eef5c --nodeps
$ ./bin/nodetool help                                                              
usage: nodetool [(-h <host> | --host <host>)]                                                                          
        [(-u <username> | --username <username>)]
        [(-pw <password> | --password <password>)] [(-p <port> | --port <port>)]
        [(-pwf <passwordFilePath> | --password-file <passwordFilePath>)] <command>
        [<args>]                                         
denesb commented 10 months ago

Submodule update: scylladb/scylladb@3d1667c720242eab1388a992a7fd5500b2c2b426