nrknithin opened a new pull request, #7322:
URL: https://github.com/apache/incubator-kie/pull/7322

   ## Summary
   
   Quarkus 3.33 ships gRPC 1.81.0, whose health classes need the protobuf 4.x 
runtime. `kie-parent` still manages `protobuf-java` at 3.25.5, and a parent's 
own dependency management takes precedence over the imported `quarkus-bom`. A 
Quarkus service with `kie-addons-quarkus-monitoring-prometheus`, 
`quarkus-smallrye-health` and a gRPC service therefore resolves protobuf 3.25.5 
next to gRPC 1.81.0 and never becomes ready:
   
   ```
   Unable to start the gRPC server: java.lang.NoClassDefFoundError: 
com/google/protobuf/RuntimeVersion$RuntimeDomain
   ```
   
   `/q/health/ready` returns 503. In dev mode the same mismatch fails the build 
with `NoSuchMethodError: ... Descriptors$FileDescriptor.getMessageType(int)`.
   
   This PR pins `version.com.google.protobuf` to 4.33.2 in 
`kogito-quarkus/bom/pom.xml`, next to the existing `version.io.grpc` pin. 
4.33.2 is the version managed by `quarkus-bom` 3.33.4. `kie-parent` is 
unchanged, so Spring Boot and non-Quarkus modules keep protobuf 3.25.5 and grpc 
1.76.0.
   
   Two regression tests are added:
   
   - `integration-tests-quarkus-monitoring-grpc`: a new module with the 
Prometheus add-on, `quarkus-smallrye-health` and a no-op `BindableService`. 
Quarkus only starts the gRPC server, and with it the gRPC health service, when 
a gRPC service exists. The service has no `.proto`, so the module also compiles 
on 3.25.5 and fails at runtime, as a user service would. `MonitoringGrpcIT` 
asserts that `/q/health/ready` is UP.
   - `PrometheusAddonDevModeTest`: starts dev mode with the add-on and checks 
that `/q/metrics` returns 200. It needs `jbpm-quarkus-deployment`, because the 
add-on requires an engine extension, and `quarkus-rest-jackson-deployment`, 
because Kogito requires a REST capability.
   
   ## Changes
   
   | File | Change |
   |------|--------|
   | `kogito-quarkus/bom/pom.xml` | added `version.com.google.protobuf` 4.33.2 
to the Quarkus-platform-aligned pins; extended the comment to say each pin must 
match `quarkus-bom` and why the pins are needed |
   | `kogito-quarkus/integration-tests/pom.xml` | registered the new module |
   | 
`kogito-quarkus/integration-tests/integration-tests-quarkus-monitoring-grpc/` | 
new module: `pom.xml`, `NoopGrpcService`, `MonitoringGrpcIT` |
   | `kogito-quarkus/addons/monitoring/prometheus/deployment/pom.xml` | test 
dependencies for `QuarkusDevModeTest` |
   | 
`kogito-quarkus/addons/monitoring/prometheus/deployment/src/test/.../PrometheusAddonDevModeTest.java`
 | new dev-mode test |
   
   ## Verification
   
   Red runs use the unfixed protobuf (`-Dversion.com.google.protobuf=3.25.5`); 
green runs use this PR.
   
   | Test | Red (3.25.5) | Green (4.33.2) |
   |---|---|---|
   | `MonitoringGrpcIT` | readiness fails, with the `NoClassDefFoundError` log 
line | 1/1 pass |
   | `PrometheusAddonDevModeTest` | `NoSuchMethodError` in `GrpcDevUIProcessor` 
| 1/1 pass |
   
   ```shell
   mvn clean verify -pl 
kogito-quarkus/integration-tests/integration-tests-quarkus-monitoring-grpc 
[-Dversion.com.google.protobuf=3.25.5]
   mvn clean test -pl kogito-quarkus/addons/monitoring/prometheus/deployment 
-Dtest=PrometheusAddonDevModeTest [-Dversion.com.google.protobuf=3.25.5]
   ```
   
   ## Related PRs
   
   - https://github.com/apache/incubator-kie-tools/pull/<N>
   - https://github.com/apache/incubator-kie-examples/pull/<N>


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to