david-streamlio opened a new pull request, #106:
URL: https://github.com/apache/pulsar-connectors/pull/106

   ### Motivation
   
   Follow-up to #105. That PR forced `protobuf-java` to 3.21.12 in the OpenMLDB 
module with a comment claiming `makeExtensionsImmutable()` was "removed in 
protobuf-java 3.22". While root-causing the same symptom in the Canal module 
(#98/#99), that claim was disproven empirically: the method survives through 
the entire 3.25.x line and was removed in protobuf-java **4.x**.
   
   The `NoSuchMethodError` the force works around is actually 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 4.29.3, outranking the platform's 3.25.5:
   
   ```
   com.google.protobuf:protobuf-java:4.29.3
      Selection reasons:
         - By conflict resolution: between versions 4.29.3, 3.25.8, 3.25.5 and 
3.16.3
   +--- io.kubernetes:client-java:23.0.0
        \--- org.apache.pulsar:pulsar-functions-secrets:4.2.0
             \--- org.apache.pulsar:pulsar-functions-instance:4.2.0  
(testImplementation)
   ```
   
   ### Modifications
   
   Bump the forced version from 3.21.12 to **3.25.5** and correct the comment. 
3.25.5 is the platform's pinned version and the same protobuf line the Pulsar 
runtime provides to the NAR in production (NARs never bundle protobuf), so the 
test classpath now matches what the connector actually runs against — and the 
module stops pinning to an older release than necessary.
   
   ### Verifying this change
   
   Run on Linux x86-64 (Ubuntu 24.04, Docker 29.1.3, OpenJDK 21):
   
   ```
   $ ./gradlew :jdbc:pulsar-io-jdbc-openmldb:test --rerun-tasks
   
   Gradle suite > Gradle test > 
org.apache.pulsar.io.jdbc.OpenMLDBJdbcSinkIntegrationTest > 
testOpenWritesAndReadsBack PASSED
   
   BUILD SUCCESSFUL in 1m 37s
   ```
   
   ### Documentation
   
   - [x] `doc-not-needed` (build/test dependency alignment)
   


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