You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "gitgabrio (via GitHub)" <gi...@apache.org> on 2024/03/05 16:10:17 UTC

[PR] [incubator-kie-issues#847] Include generated-resources to quarkus artifact [incubator-kie-drools]

gitgabrio opened a new pull request, #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765

   Fixes https://github.com/apache/incubator-kie-issues/issues/847
   Required by
   
   <details>
   <summary>
   How to replicate CI configuration locally?
   </summary>
   
   Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use [build-chain tool](https://github.com/kiegroup/github-action-build-chain) to handle cross repository builds and be sure that we always use latest version of the code for each repository.
    
   [build-chain tool](https://github.com/kiegroup/github-action-build-chain) is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See [local execution](https://github.com/kiegroup/github-action-build-chain#local-execution) details to get more information about it.
   </details>
   
   <details>
   <summary>
   How to retest this PR or trigger a specific build:
   </summary>
   
   - for <b>pull request and downstream checks</b>  
     - Push a new commit to the PR. An empty commit would be enough.
   
   - for a <b>full downstream build</b>
     - for <b>github actions</b> job: add the label `run_fdb`
   
   - for <b>Jenkins PR check only</b>
     - If you are an ASF committer for KIE podling, login to Jenkins (https://ci-builds.apache.org/job/KIE/job/drools/), go to the specific PR job, and click on `Build Now` button.
   </details>
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio merged PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#issuecomment-1985622513

   Kogito-apps failure unrelated
   ```
   2024-03-08T12:01:42.9433666Z Going to parse results form **/*-reports/TEST-*.xml
   2024-03-08T12:01:54.3252142Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanHttpIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.Approvals[0].metadata.processInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:02:02.4533279Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanKafkaIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.Approvals[0].metadata.processInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:02:10.3804906Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.ProcessInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:02:18.4107396Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBHttpIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.Approvals[0].metadata.processInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:02:26.4090241Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBKafkaIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.Approvals[0].metadata.processInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:02:34.5399197Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlHttpIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.ProcessInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:02:42.6494817Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlKafkaIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.ProcessInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:02:51.0362998Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.Approvals[0].metadata.processInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:02:59.2614269Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.Approvals[0].metadata.processInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:03:07.4092832Z apache_incubator-kie-kogito-apps/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java:1 | Assertion condition defined as a org.kie.kogito.index.AbstractProcessDataIndexIT 1 expectation failed. JSON path data.ProcessInstances[0].state doesn't match. Expected: is "ACTIVE"   Actual: PENDING  within 30 seconds.
   2024-03-08T12:03:16.7743601Z Not publishing test result due to skip_publishing=true
   2024-03-08T12:03:16.7782370Z ##[error]There were 10 failed tests
   ```


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on code in PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#discussion_r1517548114


##########
drools-model/drools-codegen-common/src/main/java/org/drools/codegen/common/AppPaths.java:
##########
@@ -47,6 +47,7 @@ public static AppPaths.BuildTool findBuildTool() {
     private final boolean isJar;
     private final BuildTool bt;
     private final Path resourcesPath;
+    private final Path generatedResourcesPath;

Review Comment:
   I did not want to make a too invasive modification, but IMO the point is that, regardless of actual path, `resourcesPath` and `generatedResourcesPath` are exactly the same thing - i.e. directories that contains the resources.
   So, in future I think they must be unified, instead of being two different objects (this is what actually happen, behind the scenes)
   I noticed that `getResourceFiles` method, and honestly it is just a leftover that I've just  fixed.
   With all that in place, I think it is clearer that the twos are actually the same thing.
   Does this make sense ?
   
   



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "mariofusco (via GitHub)" <gi...@apache.org>.
mariofusco commented on PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#issuecomment-1985394708

   > good catch @gitgabrio!
   > 
   > would be possible to introduce some test for the changes? so we'd be able to make sure we won't have a regression in the future?
   
   @porcelli we're actually testing it with this new example https://github.com/apache/incubator-kie-kogito-examples/pull/1889#pullrequestreview-1924443080


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "mariofusco (via GitHub)" <gi...@apache.org>.
mariofusco commented on code in PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#discussion_r1517454961


##########
drools-model/drools-codegen-common/src/main/java/org/drools/codegen/common/AppPaths.java:
##########
@@ -47,6 +47,7 @@ public static AppPaths.BuildTool findBuildTool() {
     private final boolean isJar;
     private final BuildTool bt;
     private final Path resourcesPath;
+    private final Path generatedResourcesPath;

Review Comment:
   > I look at the code. It would be possible to do as per your suggestion, but IMO it would be unconsistent and more cumbersome. About consistency: `generatedResourcesPath` are semantically the same as `resourcesPath` ; and both depends on the `bt` status: it make sense to manage them exactly in the same way/same place 
   
   They are probably semantically similar, nevertheless while `resourcesPath` is used in 2 distinct methods (see also `getResourceFiles()`), this is not the case for the `generatedResourcesPath`, so while it is necessary to make the first a class instance variable, this does not applies for the second.
   
   > About cumbersomeness I would need to introduce this check -> `if (bt == BuildTool.GRADLE) {` inside the `getResourcesPAths` - but this check is already executed in the constructor
   
   You're having that if anyway doing `if (generatedResourcesPath != null)`. I don't see how replacing it with `if (bt != BuildTool.GRADLE)` would make the code more cumbersome.
   



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#issuecomment-1985624991

   Kogito-runtimes failure unrelated
   ```
   2024-03-08T11:33:26.4705152Z Going to parse results form **/*-reports/TEST-*.xml
   2024-03-08T11:33:41.1274912Z apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/rules/PublishEventBusinessRuleIT.java:86 | expected: "2"  but was: "0"
   2024-03-08T11:33:48.2018449Z apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java:266 | No value present
   2024-03-08T11:33:55.1252559Z apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java:320 | No value present
   2024-03-08T11:34:01.9323392Z apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java:458 | expected: 5  but was: 0
   2024-03-08T11:34:08.6738233Z apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java:420 | expected: "2"  but was: "0"
   2024-03-08T11:34:15.4970410Z apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java:183 | No value present
   2024-03-08T11:34:25.6979981Z apache_incubator-kie-kogito-runtimes/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/WorkflowEventIT.java:96 | org.opentest4j.AssertionFailedError: expected: <ProcessInstanceStateEvent> but was: <ProcessInstanceStateDataEvent>
   2024-03-08T11:34:28.0490922Z Not publishing test result due to skip_publishing=true
   2024-03-08T11:34:28.0527819Z ##[error]There were 7 failed tests
   ```


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#issuecomment-1985759572

   @mariofusco 
   Followup [ticket](https://github.com/apache/incubator-kie-issues/issues/1003)


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#issuecomment-1985459682

   > good catch @gitgabrio!
   > 
   > would be possible to introduce some test for the changes? so we'd be able to make sure we won't have a regression in the future?
   
   Just add `AppPathsTest`, to unit test the AppPaths behaviour itself


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "mariofusco (via GitHub)" <gi...@apache.org>.
mariofusco commented on code in PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#discussion_r1517326806


##########
drools-model/drools-codegen-common/src/main/java/org/drools/codegen/common/AppPaths.java:
##########
@@ -47,6 +47,7 @@ public static AppPaths.BuildTool findBuildTool() {
     private final boolean isJar;
     private final BuildTool bt;
     private final Path resourcesPath;
+    private final Path generatedResourcesPath;

Review Comment:
   It is not necessary to add a new field at class level. This could be confined in the `getResourcePaths` method.



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on code in PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#discussion_r1517369878


##########
drools-model/drools-codegen-common/src/main/java/org/drools/codegen/common/AppPaths.java:
##########
@@ -47,6 +47,7 @@ public static AppPaths.BuildTool findBuildTool() {
     private final boolean isJar;
     private final BuildTool bt;
     private final Path resourcesPath;
+    private final Path generatedResourcesPath;

Review Comment:
   I look at the code. It would be possible to do as per your suggestion, but IMO it would be unconsistent and more cumbersome.
   About consistency:
   `generatedResourcesPath` are semantically the same as `resourcesPath` ; and both depends on the `bt` status: it make sense to manage them exactly in the same way/same place
   About cumbersomeness
   I would need to introduce this check -> `if (bt == BuildTool.GRADLE) {` inside the `getResourcesPAths` - but this check is already executed in the constructor
   
   So, even if it would be possible, I think it would make the overall result worse: wdyt ?



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [incubator-kie-issues#847] Include generated-resources directory as resource [incubator-kie-drools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on code in PR #5765:
URL: https://github.com/apache/incubator-kie-drools/pull/5765#discussion_r1517369878


##########
drools-model/drools-codegen-common/src/main/java/org/drools/codegen/common/AppPaths.java:
##########
@@ -47,6 +47,7 @@ public static AppPaths.BuildTool findBuildTool() {
     private final boolean isJar;
     private final BuildTool bt;
     private final Path resourcesPath;
+    private final Path generatedResourcesPath;

Review Comment:
   I look at the code. It would be possible to do as per your suggestion, but IMO it would be unconsistent and more cumbersome.
   About consistency:
   `generatedResourcesPath` are semantically the same as `resourcesPath` ; and both depends on the `bt` status: it make sense to manage them exactly in the same way/same place
   About cumbersomeness
   I would need to introduce this check -> `if (bt == BuildTool.GRADLE) {` inside the `getResourcesPAths` - but this check is already executed in the constructor
   
   So, even if it would be possible, I think it would make the overall result worke: wdyt ?



-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org