yesamer commented on code in PR #4270: URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4270#discussion_r3232751598
########## springboot/addons/jobs/src/main/java/org/kie/kogito/jobs/management/springboot/AddonObjectMapperBuilderCustomizer.java: ########## @@ -19,15 +19,26 @@ package org.kie.kogito.jobs.management.springboot; import org.kie.kogito.jobs.service.api.serialization.SerializationUtils; -import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; +import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import com.fasterxml.jackson.databind.ObjectMapper; + +// TODO Jackson 3 migration: switch to tools.jackson.databind.ObjectMapper and remove this BeanPostProcessor. Review Comment: @nrknithin Please add this in the same ticket I mentioned here https://github.com/apache/incubator-kie-drools/issues. ########## springboot/addons/jobs/src/test/java/org/kie/kogito/jobs/management/springboot/AddonObjectMapperBuilderCustomizerTest.java: ########## @@ -19,14 +19,16 @@ package org.kie.kogito.jobs.management.springboot; import org.junit.jupiter.api.Test; -import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; +import org.springframework.beans.factory.config.BeanPostProcessor; import static org.assertj.core.api.Assertions.assertThat; +// TODO Jackson 3 migration: switch to tools.jackson.databind.ObjectMapper (Jackson 3) once the +// post-BOM-split Spring-side migration moves AddonObjectMapperBuilderCustomizer to Jackson 3. Review Comment: @nrknithin Same ########## springboot/test/src/main/java/org/kie/kogito/testcontainers/springboot/MongoDBSpringBootTestResource.java: ########## @@ -18,28 +18,36 @@ */ package org.kie.kogito.testcontainers.springboot; +import java.util.HashMap; import java.util.Map; import org.kie.kogito.test.resources.ConditionalSpringBootTestResource; import org.kie.kogito.testcontainers.KogitoMongoDBContainer; -import static java.util.Collections.singletonMap; - /** * MongoDB spring boot resource that works within the test lifecycle. * */ public class MongoDBSpringBootTestResource extends ConditionalSpringBootTestResource<KogitoMongoDBContainer> { + // Spring Data MongoDB still reads spring.data.mongodb.uri (DataMongoProperties). Review Comment: @nrknithin This comment is redundant. ########## springboot/addons/kubernetes/src/test/java/org/kie/kogito/addons/springboot/k8s/App.java: ########## @@ -28,4 +31,11 @@ public static void main(String[] args) { SpringApplication.run(App.class, args); } + // TODO Jackson 3 migration: drop this Jackson 2 @Bean when the Spring add-ons move to Jackson 3. + // Production apps get the bean from codegen GlobalObjectMapper; this fixture bypasses codegen. + @Bean Review Comment: @nrknithin Same ########## kogito-gradle-plugin/src/main/java/org/kie/kogito/gradle/plugin/KogitoGradleExtension.java: ########## @@ -39,11 +39,18 @@ public KogitoGradleExtension(Project gradleProject) { projectBaseDir = gradleProject.getObjects().property(File.class); projectBaseDir.set(gradleProject.getLayout().getProjectDirectory().getAsFile()); + // kogito-codegen treats projectBuildOutputDirectory as the classpath directory where it + // writes generated resources (dmnModelPaths.txt, processModelPaths.txt, ...). Use Gradle's + // main-classes directory so those resources land on the runtime classpath, matching the + // Maven equivalent of ${project.build.outputDirectory} = target/classes. Review Comment: @nrknithin Just to understand, why this change is required for SB4? Did you understand why that worked in SB3? ########## springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-persistence-common/src/test/java/org/kie/kogito/it/PersistenceTest.java: ########## @@ -56,7 +56,9 @@ public abstract class PersistenceTest { RestAssured.enableLoggingOfRequestAndResponseIfValidationFails(); } - public static final Duration TIMEOUT = Duration.ofSeconds(10); + // testParallelPersistence (parallel + optimistic-lock retry) needs ~12s under loaded builds. + // TODO tighten back to 10s once the per-transaction overhead in Spring 7 + Hibernate 7 is profiled. + public static final Duration TIMEOUT = Duration.ofSeconds(30); Review Comment: @pefernan @martinweiler This may require a follow-up to determine the cause of the performance degradation ########## springboot/integration-tests/integration-tests-springboot-processes-it/src/test/java/org/kie/kogito/integrationtests/springboot/MonitoringTest.java: ########## @@ -39,7 +38,6 @@ @ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class) -@AutoConfigureObservability public class MonitoringTest extends BaseRestTest { Review Comment: @nrknithin Why this is not longer required? -- 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]
