Copilot commented on code in PR #106:
URL: https://github.com/apache/pulsar-connectors/pull/106#discussion_r3562941679


##########
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",

Review Comment:
   The forced protobuf version is hard-coded, which can drift from the 
platform/version-catalog value over time. Since this module already uses the 
version catalog (`libs.*`), consider interpolating `libs.versions.protobuf` 
here so the force always stays aligned with the platform pin.



-- 
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]

Reply via email to