apache / incubator-kie-kogito-runtimes

Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
536 stars 206 forks source link

Fix Springboot IT test reproducible failing when code is modified for build time only modules #3579

Closed fjtirado closed 2 months ago

fjtirado commented 2 months ago

If common-openapi jar is modified, reproducilbe will always fail no matter the nature of the change. The PR makes a dummy modification on common-openapi, which makes reprodubile to fail on CI, and change the pom for springboot integration test in order to avoid that failure.

gitgabrio commented 2 months ago

@fjtirado Do you know why the org.kie.kogito:kogito-spring-boot-integration-tests pom

explicitily configure maven-invoker-plugin ?

fjtirado commented 2 months ago

@fjtirado Do you know why the org.kie.kogito:kogito-spring-boot-integration-tests pom

explicitily configure maven-invoker-plugin ?

No, unfortunately that part was pretty obscure to me since I enter the project and I do not know who should ask about it

fjtirado commented 2 months ago

Initial attempt to fix, base on include workflow-builder did not have any effect. Trying including the dependency common-openapi, explicitly

fjtirado commented 2 months ago

@gitgabrio @baldimir Adding the dependency worked. However I did not like that solution because I feel any time we modify a module which is not a spring boot dependency, the CI will fail. Therefore, I would like to disable compare goal for SpringBoot integration test module, base on the fact that integration tests are not part of the delivery. Let me know which option do you prefer.

gitgabrio commented 2 months ago

It seems that this fix works, and it could make sense, since without it, IINW - maven reactor does not know that the springboot it depends (somehow) on the openapi module. So, I think it is good, thanks! I understand your concern, but in general, I think it is better to have the reproducible working everywhere - we discussed a lot in the past of what should or should not be reproducible. Last, it would be interesting to understand why the problem appear only in springboot and not on quarkus: the modules should be similar as much as possible, and I do not think that quarkus frameworks plays any role here 🤔

fjtirado commented 2 months ago

without it, IINW - maven reactor does not know that the springboot it depends (somehow) on the open

@gitgabrio The problem is that the springboot integration test does not depends at all on the openapi-common API but somehow is including it, together with a lot of quarkus extensions, into the list of compared jars. Below there is an excerpt of the diff compare file for Springboot IT test module, you can see the quarkus dependencies at the bottom in the okFiles list. I believe it is because of the bom import. So my recommendation is to disable the comparison for springboot IT Test module (the fact that including common-openapi manually makes it work, indicates that what comparing procedure is doing is downloading the artifacts that are not "local" to maven-invoker and comparing them with the compiled ones. All jars that are not dependencies of Springboot are not "local" to maven-invoker, so modifying any jar that is not a springboot dependency will provoke that issue) I tried that in this PR and it gets green light (please note that this disables comparison ONLY for the IT test module, which is not part of the delivery, the build is still reproducible) .

2024-07-12T19:18:09.7410964Z okFiles="kogito-runtimes-999-SNAPSHOT.pom kogito-runtimes-999-SNAPSHOT.pom kogito-build-999-SNAPSHOT.pom kogito-build-999-SNAPSHOT.pom kogito-dependencies-bom-999-SNAPSHOT.pom kogito-dependencies-bom-999-SNAPSHOT.pom kogito-ide-config-999-SNAPSHOT.pom kogito-ide-config-999-SNAPSHOT.jar kogito-build-no-bom-parent-999-SNAPSHOT.pom kogito-build-no-bom-parent-999-SNAPSHOT.pom kogito-build-parent-999-SNAPSHOT.pom kogito-build-parent-999-SNAPSHOT.pom kogito-kie-bom-999-SNAPSHOT.pom kogito-kie-bom-999-SNAPSHOT.pom kogito-bom-999-SNAPSHOT.pom kogito-bom-999-SNAPSHOT.pom kogito-api-parent-999-SNAPSHOT.pom kogito-api-parent-999-SNAPSHOT.pom kogito-api-999-SNAPSHOT.pom kogito-api-999-SNAPSHOT.jar kogito-api-999-SNAPSHOT-tests.jar kogito-api-999-SNAPSHOT-sources.jar kogito-api-999-SNAPSHOT-test-sources.jar kogito-events-api-999-SNAPSHOT.pom kogito-events-api-999-SNAPSHOT.jar kogito-events-api-999-SNAPSHOT-tests.jar kogito-events-api-999-SNAPSHOT-sources.jar kogito-events-api-999-SNAPSHOT-test-sources.jar kogito-workitems-999-SNAPSHOT.pom kogito-workitems-999-SNAPSHOT.pom kogito-jackson-utils-999-SNAPSHOT.pom kogito-jackson-utils-999-SNAPSHOT.jar kogito-jackson-utils-999-SNAPSHOT-tests.jar kogito-jackson-utils-999-SNAPSHOT-sources.jar kogito-jackson-utils-999-SNAPSHOT-test-sources.jar kogito-events-core-999-SNAPSHOT.pom kogito-events-core-999-SNAPSHOT.jar kogito-events-core-999-SNAPSHOT-tests.jar kogito-events-core-999-SNAPSHOT-sources.jar kogito-events-core-999-SNAPSHOT-test-sources.jar kogito-timer-999-SNAPSHOT.pom kogito-timer-999-SNAPSHOT.jar kogito-timer-999-SNAPSHOT-tests.jar kogito-timer-999-SNAPSHOT-sources.jar kogito-timer-999-SNAPSHOT-test-sources.jar kogito-services-999-SNAPSHOT.pom kogito-services-999-SNAPSHOT.jar kogito-services-999-SNAPSHOT-tests.jar kogito-services-999-SNAPSHOT-sources.jar kogito-services-999-SNAPSHOT-test-sources.jar jobs-service-api-999-SNAPSHOT.pom jobs-service-api-999-SNAPSHOT.jar jobs-service-api-999-SNAPSHOT-tests.jar jobs-service-api-999-SNAPSHOT-sources.jar jobs-service-api-999-SNAPSHOT-test-sources.jar kogito-api-incubation-common-objectmapper-999-SNAPSHOT.pom kogito-api-incubation-common-objectmapper-999-SNAPSHOT.jar kogito-api-incubation-common-objectmapper-999-SNAPSHOT-tests.jar kogito-api-incubation-common-objectmapper-999-SNAPSHOT-sources.jar kogito-api-incubation-common-objectmapper-999-SNAPSHOT-test-sources.jar kogito-api-incubation-common-999-SNAPSHOT.pom kogito-api-incubation-common-999-SNAPSHOT.jar kogito-api-incubation-common-999-SNAPSHOT-tests.jar kogito-api-incubation-common-999-SNAPSHOT-sources.jar kogito-api-incubation-common-999-SNAPSHOT-test-sources.jar kogito-api-incubation-application-999-SNAPSHOT.pom kogito-api-incubation-application-999-SNAPSHOT.jar kogito-api-incubation-application-999-SNAPSHOT-tests.jar kogito-api-incubation-application-999-SNAPSHOT-sources.jar kogito-api-incubation-application-999-SNAPSHOT-test-sources.jar kogito-api-incubation-processes-999-SNAPSHOT.pom kogito-api-incubation-processes-999-SNAPSHOT.jar kogito-api-incubation-processes-999-SNAPSHOT-tests.jar kogito-api-incubation-processes-999-SNAPSHOT-sources.jar kogito-api-incubation-processes-999-SNAPSHOT-test-sources.jar kogito-api-incubation-processes-services-999-SNAPSHOT.pom kogito-api-incubation-processes-services-999-SNAPSHOT.jar kogito-api-incubation-processes-services-999-SNAPSHOT-tests.jar kogito-api-incubation-processes-services-999-SNAPSHOT-sources.jar kogito-api-incubation-processes-services-999-SNAPSHOT-test-sources.jar kogito-api-incubation-predictions-999-SNAPSHOT.pom kogito-api-incubation-predictions-999-SNAPSHOT.jar kogito-api-incubation-predictions-999-SNAPSHOT-tests.jar kogito-api-incubation-predictions-999-SNAPSHOT-sources.jar kogito-api-incubation-predictions-999-SNAPSHOT-test-sources.jar kogito-api-incubation-predictions-services-999-SNAPSHOT.pom kogito-api-incubation-predictions-services-999-SNAPSHOT.jar kogito-api-incubation-predictions-services-999-SNAPSHOT-tests.jar kogito-api-incubation-predictions-services-999-SNAPSHOT-sources.jar kogito-api-incubation-predictions-services-999-SNAPSHOT-test-sources.jar kogito-api-incubation-decisions-999-SNAPSHOT.pom kogito-api-incubation-decisions-999-SNAPSHOT.jar kogito-api-incubation-decisions-999-SNAPSHOT-tests.jar kogito-api-incubation-decisions-999-SNAPSHOT-sources.jar kogito-api-incubation-decisions-999-SNAPSHOT-test-sources.jar kogito-api-incubation-decisions-services-999-SNAPSHOT.pom kogito-api-incubation-decisions-services-999-SNAPSHOT.jar kogito-api-incubation-decisions-services-999-SNAPSHOT-tests.jar kogito-api-incubation-decisions-services-999-SNAPSHOT-sources.jar kogito-api-incubation-decisions-services-999-SNAPSHOT-test-sources.jar kogito-api-incubation-rules-999-SNAPSHOT.pom kogito-api-incubation-rules-999-SNAPSHOT.jar kogito-api-incubation-rules-999-SNAPSHOT-tests.jar kogito-api-incubation-rules-999-SNAPSHOT-sources.jar kogito-api-incubation-rules-999-SNAPSHOT-test-sources.jar kogito-api-incubation-rules-services-999-SNAPSHOT.pom kogito-api-incubation-rules-services-999-SNAPSHOT.jar kogito-api-incubation-rules-services-999-SNAPSHOT-tests.jar kogito-api-incubation-rules-services-999-SNAPSHOT-sources.jar kogito-api-incubation-rules-services-999-SNAPSHOT-test-sources.jar drools-999-SNAPSHOT.pom drools-999-SNAPSHOT.pom kogito-drools-999-SNAPSHOT.pom kogito-drools-999-SNAPSHOT.jar kogito-drools-999-SNAPSHOT-tests.jar kogito-drools-999-SNAPSHOT-sources.jar kogito-drools-999-SNAPSHOT-test-sources.jar kogito-dmn-999-SNAPSHOT.pom kogito-dmn-999-SNAPSHOT.jar kogito-dmn-999-SNAPSHOT-tests.jar kogito-dmn-999-SNAPSHOT-sources.jar kogito-dmn-999-SNAPSHOT-test-sources.jar kogito-pmml-api-dependencies-999-SNAPSHOT.pom kogito-pmml-api-dependencies-999-SNAPSHOT.jar kogito-pmml-api-dependencies-999-SNAPSHOT-tests.jar kogito-pmml-api-dependencies-999-SNAPSHOT-sources.jar kogito-pmml-api-dependencies-999-SNAPSHOT-test-sources.jar kogito-efesto-drl-999-SNAPSHOT.pom kogito-efesto-drl-999-SNAPSHOT.pom kogito-pmml-dependencies-999-SNAPSHOT.pom kogito-pmml-dependencies-999-SNAPSHOT.pom kogito-pmml-999-SNAPSHOT.pom kogito-pmml-999-SNAPSHOT.jar kogito-pmml-999-SNAPSHOT-tests.jar kogito-pmml-999-SNAPSHOT-sources.jar kogito-pmml-999-SNAPSHOT-test-sources.jar kogito-pmml-openapi-999-SNAPSHOT.pom kogito-pmml-openapi-999-SNAPSHOT.jar kogito-pmml-openapi-999-SNAPSHOT-tests.jar kogito-pmml-openapi-999-SNAPSHOT-sources.jar kogito-pmml-openapi-999-SNAPSHOT-test-sources.jar kogito-scenario-simulation-999-SNAPSHOT.pom kogito-scenario-simulation-999-SNAPSHOT.jar kogito-scenario-simulation-999-SNAPSHOT-tests.jar kogito-scenario-simulation-999-SNAPSHOT-sources.jar kogito-scenario-simulation-999-SNAPSHOT-test-sources.jar jbpm-999-SNAPSHOT.pom jbpm-999-SNAPSHOT.pom process-workitems-999-SNAPSHOT.pom process-workitems-999-SNAPSHOT.jar process-workitems-999-SNAPSHOT-tests.jar process-workitems-999-SNAPSHOT-sources.jar process-workitems-999-SNAPSHOT-test-sources.jar jbpm-flow-999-SNAPSHOT.pom jbpm-flow-999-SNAPSHOT.jar jbpm-flow-999-SNAPSHOT-tests.jar jbpm-flow-999-SNAPSHOT-sources.jar jbpm-flow-999-SNAPSHOT-test-sources.jar jbpm-flow-builder-999-SNAPSHOT.pom jbpm-flow-builder-999-SNAPSHOT.jar jbpm-flow-builder-999-SNAPSHOT-tests.jar jbpm-flow-builder-999-SNAPSHOT-sources.jar jbpm-flow-builder-999-SNAPSHOT-test-sources.jar jbpm-bpmn2-999-SNAPSHOT.pom jbpm-bpmn2-999-SNAPSHOT.jar jbpm-bpmn2-999-SNAPSHOT-tests.jar jbpm-bpmn2-999-SNAPSHOT-sources.jar jbpm-bpmn2-999-SNAPSHOT-test-sources.jar process-serialization-protobuf-999-SNAPSHOT.pom process-serialization-protobuf-999-SNAPSHOT.jar process-serialization-protobuf-999-SNAPSHOT-tests.jar process-serialization-protobuf-999-SNAPSHOT-sources.jar process-serialization-protobuf-999-SNAPSHOT-test-sources.jar jbpm-flow-migration-999-SNAPSHOT.pom jbpm-flow-migration-999-SNAPSHOT.jar jbpm-flow-migration-999-SNAPSHOT-tests.jar jbpm-flow-migration-999-SNAPSHOT-sources.jar jbpm-flow-migration-999-SNAPSHOT-test-sources.jar jbpm-tools-999-SNAPSHOT.pom jbpm-tools-maven-plugin-999-SNAPSHOT.pom jbpm-tools-maven-plugin-999-SNAPSHOT.jar jbpm-tools-maven-plugin-999-SNAPSHOT-tests.jar jbpm-tools-maven-plugin-999-SNAPSHOT-sources.jar jbpm-tools-maven-plugin-999-SNAPSHOT-test-sources.jar jbpm-tests-999-SNAPSHOT.pom jbpm-tests-999-SNAPSHOT.jar jbpm-tests-999-SNAPSHOT-tests.jar jbpm-tests-999-SNAPSHOT-sources.jar jbpm-tests-999-SNAPSHOT-test-sources.jar kogito-codegen-modules-999-SNAPSHOT.pom kogito-codegen-modules-999-SNAPSHOT.pom kogito-codegen-api-999-SNAPSHOT.pom kogito-codegen-api-999-SNAPSHOT.jar kogito-codegen-api-999-SNAPSHOT-tests.jar kogito-codegen-api-999-SNAPSHOT-sources.jar kogito-codegen-api-999-SNAPSHOT-test-sources.jar kogito-codegen-core-999-SNAPSHOT.pom kogito-codegen-core-999-SNAPSHOT.jar kogito-codegen-core-999-SNAPSHOT-tests.jar kogito-codegen-core-999-SNAPSHOT-sources.jar kogito-codegen-core-999-SNAPSHOT-test-sources.jar kogito-rest-utils-999-SNAPSHOT.pom kogito-rest-utils-999-SNAPSHOT.jar kogito-rest-utils-999-SNAPSHOT-tests.jar kogito-rest-utils-999-SNAPSHOT-sources.jar kogito-rest-utils-999-SNAPSHOT-test-sources.jar kogito-serverless-workflow-999-SNAPSHOT.pom kogito-serverless-workflow-999-SNAPSHOT.pom kogito-serverless-workflow-utils-999-SNAPSHOT.pom kogito-serverless-workflow-utils-999-SNAPSHOT.jar kogito-serverless-workflow-utils-999-SNAPSHOT-tests.jar kogito-serverless-workflow-utils-999-SNAPSHOT-sources.jar kogito-serverless-workflow-utils-999-SNAPSHOT-test-sources.jar kogito-jsonpath-expression-999-SNAPSHOT.pom kogito-jsonpath-expression-999-SNAPSHOT.jar kogito-jsonpath-expression-999-SNAPSHOT-tests.jar kogito-jsonpath-expression-999-SNAPSHOT-sources.jar kogito-jsonpath-expression-999-SNAPSHOT-test-sources.jar kogito-jq-expression-999-SNAPSHOT.pom kogito-jq-expression-999-SNAPSHOT.jar kogito-jq-expression-999-SNAPSHOT-tests.jar kogito-jq-expression-999-SNAPSHOT-sources.jar kogito-jq-expression-999-SNAPSHOT-test-sources.jar kogito-serverless-workflow-runtime-999-SNAPSHOT.pom kogito-serverless-workflow-runtime-999-SNAPSHOT.jar kogito-serverless-workflow-runtime-999-SNAPSHOT-tests.jar kogito-serverless-workflow-runtime-999-SNAPSHOT-sources.jar kogito-serverless-workflow-runtime-999-SNAPSHOT-test-sources.jar kogito-serverless-workflow-builder-999-SNAPSHOT.pom kogito-serverless-workflow-builder-999-SNAPSHOT.jar kogito-serverless-workflow-builder-999-SNAPSHOT-tests.jar kogito-serverless-workflow-builder-999-SNAPSHOT-sources.jar kogito-serverless-workflow-builder-999-SNAPSHOT-test-sources.jar grafana-api-999-SNAPSHOT.pom grafana-api-999-SNAPSHOT.jar grafana-api-999-SNAPSHOT-tests.jar grafana-api-999-SNAPSHOT-sources.jar grafana-api-999-SNAPSHOT-test-sources.jar kogito-codegen-processes-999-SNAPSHOT.pom kogito-codegen-processes-999-SNAPSHOT.jar kogito-codegen-processes-999-SNAPSHOT-tests.jar kogito-codegen-processes-999-SNAPSHOT-sources.jar kogito-codegen-processes-999-SNAPSHOT-test-sources.jar kogito-test-utils-999-SNAPSHOT.pom kogito-test-utils-999-SNAPSHOT.jar kogito-test-utils-999-SNAPSHOT-tests.jar kogito-test-utils-999-SNAPSHOT-sources.jar kogito-test-utils-999-SNAPSHOT-test-sources.jar kogito-codegen-decisions-999-SNAPSHOT.pom kogito-codegen-decisions-999-SNAPSHOT.jar kogito-codegen-decisions-999-SNAPSHOT-tests.jar kogito-codegen-decisions-999-SNAPSHOT-sources.jar kogito-codegen-decisions-999-SNAPSHOT-test-sources.jar kogito-codegen-rules-999-SNAPSHOT.pom kogito-codegen-rules-999-SNAPSHOT.jar kogito-codegen-rules-999-SNAPSHOT-tests.jar kogito-codegen-rules-999-SNAPSHOT-sources.jar kogito-codegen-rules-999-SNAPSHOT-test-sources.jar kogito-codegen-processes-integration-tests-999-SNAPSHOT.pom kogito-codegen-processes-integration-tests-999-SNAPSHOT.jar kogito-codegen-processes-integration-tests-999-SNAPSHOT-tests.jar kogito-codegen-processes-integration-tests-999-SNAPSHOT-sources.jar kogito-codegen-processes-integration-tests-999-SNAPSHOT-test-sources.jar kogito-codegen-predictions-999-SNAPSHOT.pom kogito-codegen-predictions-999-SNAPSHOT.jar kogito-codegen-predictions-999-SNAPSHOT-tests.jar kogito-codegen-predictions-999-SNAPSHOT-sources.jar kogito-codegen-predictions-999-SNAPSHOT-test-sources.jar kogito-codegen-integration-tests-999-SNAPSHOT.pom kogito-codegen-integration-tests-999-SNAPSHOT.jar kogito-codegen-integration-tests-999-SNAPSHOT-tests.jar kogito-codegen-integration-tests-999-SNAPSHOT-sources.jar kogito-codegen-integration-tests-999-SNAPSHOT-test-sources.jar kogito-codegen-sample-999-SNAPSHOT.pom kogito-codegen-sample-runtime-999-SNAPSHOT.pom kogito-codegen-sample-runtime-999-SNAPSHOT.jar kogito-codegen-sample-runtime-999-SNAPSHOT-tests.jar kogito-codegen-sample-runtime-999-SNAPSHOT-sources.jar kogito-codegen-sample-runtime-999-SNAPSHOT-test-sources.jar kogito-codegen-sample-generator-999-SNAPSHOT.pom kogito-codegen-sample-generator-999-SNAPSHOT.jar kogito-codegen-sample-generator-999-SNAPSHOT-tests.jar kogito-codegen-sample-generator-999-SNAPSHOT-sources.jar kogito-codegen-sample-generator-999-SNAPSHOT-test-sources.jar quarkus-999-SNAPSHOT.pom quarkus-999-SNAPSHOT.pom kogito-quarkus-bom-999-SNAPSHOT.pom kogito-quarkus-bom-999-SNAPSHOT.pom quarkus-extensions-999-SNAPSHOT.pom quarkus-extensions-999-SNAPSHOT.pom kogito-quarkus-extension-spi-999-SNAPSHOT.pom kogito-quarkus-extension-spi-999-SNAPSHOT.jar kogito-quarkus-extension-spi-999-SNAPSHOT-tests.jar kogito-quarkus-extension-spi-999-SNAPSHOT-sources.jar kogito-quarkus-extension-spi-999-SNAPSHOT-test-sources.jar kogito-rest-workitem-999-SNAPSHOT.pom kogito-rest-workitem-999-SNAPSHOT.jar kogito-rest-workitem-999-SNAPSHOT-tests.jar kogito-rest-workitem-999-SNAPSHOT-sources.jar kogito-rest-workitem-999-SNAPSHOT-test-sources.jar kogito-quarkus-extension-common-999-SNAPSHOT.pom kogito-quarkus-extension-common-999-SNAPSHOT.pom kogito-quarkus-common-999-SNAPSHOT.pom kogito-quarkus-common-999-SNAPSHOT.jar kogito-quarkus-common-999-SNAPSHOT-tests.jar kogito-quarkus-common-999-SNAPSHOT-sources.jar kogito-quarkus-common-999-SNAPSHOT-test-sources.jar kogito-quarkus-common-deployment-999-SNAPSHOT.pom kogito-quarkus-common-deployment-999-SNAPSHOT.jar kogito-quarkus-common-deployment-999-SNAPSHOT-tests.jar kogito-quarkus-common-deployment-999-SNAPSHOT-sources.jar

gitgabrio commented 2 months ago

@fjtirado please read here : it seems your first approach was actually the right one 👍 😄

fjtirado commented 2 months ago

@fjtirado please read here : it seems your first approach was actually the right one 👍 😄

@gitgabrio I do not know how to say that openapi-common is not direct or transitive or a dependency at all for SpringBoot (as the quarkus one) and is still being considered by the compare goal. That means that when we change any quarkus dependency, we will have to add it to the springboot pom in order to get green light. Do you really think thats the right approach?

gitgabrio commented 2 months ago

@fjtirado please read here : it seems your first approach was actually the right one 👍 😄

@gitgabrio I do not know how to say that openapi-common is not direct or transitive or a dependency at all for SpringBoot (as the quarkus one) and is still being considered by the compare goal. That means that when we change any quarkus dependency, we will have to add it to the springboot pom in order to get green light. Do you really think thats the right approach?

The right approach would be to go inside each of such it tests, remove the boms, and add only the actually required dependency. Then, eventually, the parent pom would need to declare only the actually needed dependecies. But since we need a fix now, and, as you may read by yourself in the comment of the very pom you modified, this is already the current approach, I would say that for the moment being is the best thing to do.