You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2026/09/17 00:18:46 UTC
(pulsar-connectors) branch master updated: [improve][io] Align the OpenMLDB module's forced protobuf with the platform version (#106)
This is an automated email from the ASF dual-hosted git repository.
merlimat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-connectors.git
The following commit(s) were added to refs/heads/master by this push:
new 73548fac [improve][io] Align the OpenMLDB module's forced protobuf with the platform version (#106)
73548fac is described below
commit 73548facd42c286bd2667ba1c783f17d296b45ed
Author: David Kjerrumgaard <35...@users.noreply.github.com>
AuthorDate: Wed Sep 16 17:18:40 2026 -0700
[improve][io] Align the OpenMLDB module's forced protobuf with the platform version (#106)
Follow-up to #105, which forced protobuf-java to 3.21.12 with a comment
claiming makeExtensionsImmutable() was removed in protobuf 3.22. That
was wrong: the method survives through the whole 3.25.x line and was
removed in protobuf-java 4.x. The NoSuchMethodError the force works
around is caused by the TEST classpath resolving protobuf 4.x by
conflict resolution (io.kubernetes:client-java, a transitive of the
test-only pulsar-functions-instance, requests it), not by the
platform's 3.25.5.
Force 3.25.5 instead: the platform version and the same protobuf line
the Pulsar runtime provides to the NAR in production, so the test
classpath now matches what the connector actually runs against.
Verified on Linux x86-64: OpenMLDBJdbcSinkIntegrationTest passes with
the 3.25.5 force.
---
jdbc/openmldb/build.gradle.kts | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/jdbc/openmldb/build.gradle.kts b/jdbc/openmldb/build.gradle.kts
index eea5fd47..409d798c 100644
--- a/jdbc/openmldb/build.gradle.kts
+++ b/jdbc/openmldb/build.gradle.kts
@@ -30,16 +30,19 @@ plugins {
// - Curator: the SDK calls NodeCache.getListenable() expecting the 4.x signature (returning
// ListenerContainer); Curator 5.x changed it to return Listenable -> NoSuchMethodError on
// connect under the platform's 5.7.1.
-// - Protobuf: the SDK's generated classes (protoc 3.16) call makeExtensionsImmutable(), removed
-// in protobuf-java 3.22 -> NoSuchMethodError on insert under the platform's 3.25.5. 3.21.12 is
-// the newest runtime that still has it. (NARs never bundle protobuf — the Pulsar runtime
-// provides it — so this only affects compile/test classpaths.)
+// - Protobuf: the SDK's generated classes (protoc 3.16) call makeExtensionsImmutable(), which
+// protobuf-java 4.x removed (the 3.25.x line still has it). Without the force, the TEST
+// classpath resolves protobuf 4.x by conflict resolution — io.kubernetes:client-java, a
+// transitive of the test-only pulsar-functions-instance, requests it — and the SDK throws
+// NoSuchMethodError on insert. Force the platform's 3.25.5: the same line the Pulsar runtime
+// provides to the NAR in production (NARs never bundle protobuf), so the test matches what
+// the connector actually runs against.
configurations.all {
resolutionStrategy.force(
"org.apache.curator:curator-client:4.2.0",
"org.apache.curator:curator-framework:4.2.0",
"org.apache.curator:curator-recipes:4.2.0",
- "com.google.protobuf:protobuf-java:3.21.12",
+ "com.google.protobuf:protobuf-java:3.25.5",
)
}