davsclaus opened a new pull request, #30495: URL: https://github.com/apache/camel/pull/30495
## What [CAMEL-27300](https://issues.apache.org/jira/browse/CAMEL-27300): Camel managed protobuf-java 4.35.1, but the protobuf classes in the Apicurio Registry 3.3.4 protobuf serdes (`apicurio-registry-protobuf-serde-kafka`, `-serde-common-protobuf`, `-protobuf-schema-utilities`) are generated with protoc 4.36.2 (`RuntimeVersion.validateProtobufGencodeVersion(PUBLIC, 4, 36, 2, ...)` in `RefOuterClass`, `additionalTypes.Decimals` and `metadata.ProtobufSchemaMetadata`). Loading them fails: ``` ExceptionInInitializerError: com.google.protobuf.RuntimeVersion$ProtobufRuntimeVersionException: Detected incompatible Protobuf Gencode/Runtime versions when loading RefOuterClass: gencode 4.36.2, runtime 4.35.1. Runtime version cannot be older than the linked gencode version. ``` and after the first time, `NoClassDefFoundError: Could not initialize class ...`. ## Change - `protobuf-version` (the protobuf-java and protobuf-java-util runtime) goes to 4.36.2, the latest release and the gencode version of Apicurio Registry 3.3.4 (Apicurio itself builds with protobuf 4.36.2; Spring Boot 4.2.0 manages 4.36.2). - A new `protoc-version` property (4.35.1, unchanged) is the protoc that generates Camel's own protobuf classes (camel-salesforce Pub/Sub, camel-kserve, camel-tensorflow-serving, and the test classes of camel-grpc and camel-protobuf). Before, both came from `protobuf-version`. Why split them: the gencode of Camel's classes must stay at or below the lowest protobuf-java runtime of Spring Boot and Quarkus (the rule from "chore: downgrade protobuf-version to 4.34.2" and the Dependabot ignore for `com.google.protobuf`). Quarkus 3.40.x manages protobuf-java 4.35.0 and Quarkus 4.0.0 manages 4.35.1, so generating Camel's classes with protoc 4.36.2 would make them fail on Quarkus the same way. A 4.36.2 runtime loads 4.35.1 gencode fine (a runtime may be newer than the gencode). The Dependabot comment now names both properties. No upgrade guide entry: a dependency bump within protobuf 4.x, and the gencode of Camel's classes does not change. Related: [CAMEL-27298](https://issues.apache.org/jira/browse/CAMEL-27298) (camel-kafka: the consumer stopped reading without logging when the deserializer failed this way) is fixed in a separate PR. ## Tests - New `KafkaSchemaRegistryVendorClassesTest#testApicurioProtobufGeneratedClassesInitialize` initializes the three generated Apicurio classes. With `-Dprotobuf-version=4.35.1` it fails (3 of 3, `ProtobufRuntimeVersionException` gencode 4.36.2, runtime 4.35.1); with this change it passes. - camel-kafka `KafkaSchemaRegistryVendor*Test`: 60 tests, 0 failures. - camel-protobuf: 19 tests, 0 failures. camel-grpc: 85 tests, 0 failures. camel-kserve: 20 tests, 0 failures. camel-salesforce `PubSubApi*Test`: 7 tests, 0 failures. - camel-tensorflow-serving and camel-google-vertexai compile (test-compile). The generated sources of camel-grpc and camel-salesforce still have gencode 4.35. - `camel-sbom.json` still lists 4.35.1; it is regenerated by the weekly SBOM job. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
