-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DROOLS-7025] Move "efesto" inside "drools" repo #4490
Conversation
(tests) - kogito-runtimes job Test results:
Those are the test failures: org.jbpm.bpmn2.ProcessFactoryTest.testBoundaryTimerTimeCyclejava.util.ConcurrentModificationExceptionat java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1661) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at org.jbpm.bpmn2.JbpmBpmn2TestCase.getNotTriggeredNodes(JbpmBpmn2TestCase.java:280) at org.jbpm.bpmn2.JbpmBpmn2TestCase.assertNodeTriggered(JbpmBpmn2TestCase.java:242) at org.jbpm.bpmn2.ProcessFactoryTest.testBoundaryTimerTimeCycle(ProcessFactoryTest.java:193) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutInvocation.proceed(TimeoutInvocation.java:46) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:188) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:154) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548) |
efesto/efesto-core/common-api/src/main/java/org/kie/efesto/common/api/model/FRI.java
Outdated
Show resolved
Hide resolved
efesto/efesto-core/common-api/src/main/java/org/kie/efesto/common/api/model/FRI.java
Outdated
Show resolved
Hide resolved
import com.github.javaparser.ast.body.*; | ||
import com.github.javaparser.ast.expr.*; | ||
import com.github.javaparser.ast.stmt.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually try to avoid wildcard imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielezonca Is there a technical reason ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember if there was a particular reason for that. There are some drawback using wildcard import especially in case of classname clash (see this for example).
Another reason is to try to align codestyle in the codebase but this should be enforced via proper plugin
...e-manager-api/src/main/java/org/kie/efesto/runtimemanager/api/service/KieRuntimeService.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniele Zonca <dzonca@redhat.com>
Co-authored-by: Daniele Zonca <dzonca@redhat.com>
(tests) - kogito-examples job Test results:
Those are the test failures: org.kie.kogito.decisiontable.quarkus.RestQueryTest.testNotApprovedjava.lang.RuntimeException:java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateSources threw an exception: org.kie.kogito.codegen.rules.RuleCodegenError: Errors were generated during the code-generation process: No data of this type found. Use containsData to check for this first. at org.kie.kogito.codegen.rules.DroolsModelBuilder.build(DroolsModelBuilder.java:79) at org.kie.kogito.codegen.rules.RuleCodegen.internalGenerate(RuleCodegen.java:110) at org.kie.kogito.codegen.core.AbstractGenerator.generate(AbstractGenerator.java:69) at org.kie.kogito.codegen.core.ApplicationGenerator.lambda$generateComponents$0(ApplicationGenerator.java:99) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at org.kie.kogito.codegen.core.ApplicationGenerator.generateComponents(ApplicationGenerator.java:101) at org.kie.kogito.codegen.core.ApplicationGenerator.generate(ApplicationGenerator.java:76) at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateFiles(KogitoAssetsProcessor.java:223) at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateSources(KogitoAssetsProcessor.java:127) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:944) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) at java.base/java.lang.Thread.run(Thread.java:829) at org.jboss.threads.JBossThread.run(JBossThread.java:501) Caused by: java.lang.IllegalStateException: No data of this type found. Use containsData to check for this first. at com.github.javaparser.ast.Node.getData(Node.java:505) at com.github.javaparser.ast.CompilationUnit.getPrinter(CompilationUnit.java:154) at com.github.javaparser.ast.Node.lambda$getPrinter$1(Node.java:199) at java.base/java.util.Optional.map(Optional.java:265) at com.github.javaparser.ast.Node.getPrinter(Node.java:199) at com.github.javaparser.ast.Node.toString(Node.java:322) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.TreeMap$ValueSpliterator.forEachRemaining(TreeMap.java:2890) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:952) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:926) at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408) at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:496) at java.base/java.util.stream.IntPipeline.max(IntPipeline.java:459) at org.drools.model.codegen.execmodel.PackageModel.generateRulesInUnit(PackageModel.java:708) at org.drools.model.codegen.execmodel.PackageModel.lambda$getRulesSource$6(PackageModel.java:596) at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4698) at org.drools.model.codegen.execmodel.PackageModel.getRulesSource(PackageModel.java:587) at org.drools.model.codegen.execmodel.PackageModelWriter.(PackageModelWriter.java:38) at org.drools.model.codegen.project.KogitoPackageSources.dumpSources(KogitoPackageSources.java:68) at org.drools.model.codegen.execmodel.processors.SourceCodeGenerationPhase.process(SourceCodeGenerationPhase.java:51) at org.drools.compiler.builder.impl.processors.IteratingPhase.process(IteratingPhase.java:56) at org.drools.model.codegen.execmodel.processors.ModelMainCompilationPhase.process(ModelMainCompilationPhase.java:103) at org.drools.model.codegen.execmodel.ModelBuilderImpl.doSecondBuildStep(ModelBuilderImpl.java:112) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:120) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:104) at org.kie.kogito.codegen.rules.DroolsModelBuilder.build(DroolsModelBuilder.java:73) ... 25 more at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:632) at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:703) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:73) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:77) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:355) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:302) at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:280) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:272) at java.base/java.util.Optional.orElseGet(Optional.java:369) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:271) at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:102) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:101) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:66) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:188) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:154) at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548) Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateSources threw an exception: org.kie.kogito.codegen.rules.RuleCodegenError: Errors were generated during the code-generation process: No data of this type found. Use containsData to check for this first. at org.kie.kogito.codegen.rules.DroolsModelBuilder.build(DroolsModelBuilder.java:79) at org.kie.kogito.codegen.rules.RuleCodegen.internalGenerate(RuleCodegen.java:110) at org.kie.kogito.codegen.core.AbstractGenerator.generate(AbstractGenerator.java:69) at org.kie.kogito.codegen.core.ApplicationGenerator.lambda$generateComponents$0(ApplicationGenerator.java:99) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at org.kie.kogito.codegen.core.ApplicationGenerator.generateComponents(ApplicationGenerator.java:101) at org.kie.kogito.codegen.core.ApplicationGenerator.generate(ApplicationGenerator.java:76) at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateFiles(KogitoAssetsProcessor.java:223) at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateSources(KogitoAssetsProcessor.java:127) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:944) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) at java.base/java.lang.Thread.run(Thread.java:829) at org.jboss.threads.JBossThread.run(JBossThread.java:501) Caused by: java.lang.IllegalStateException: No data of this type found. Use containsData to check for this first. at com.github.javaparser.ast.Node.getData(Node.java:505) at com.github.javaparser.ast.CompilationUnit.getPrinter(CompilationUnit.java:154) at com.github.javaparser.ast.Node.lambda$getPrinter$1(Node.java:199) at java.base/java.util.Optional.map(Optional.java:265) at com.github.javaparser.ast.Node.getPrinter(Node.java:199) at com.github.javaparser.ast.Node.toString(Node.java:322) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.TreeMap$ValueSpliterator.forEachRemaining(TreeMap.java:2890) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:952) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:926) at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408) at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:496) at java.base/java.util.stream.IntPipeline.max(IntPipeline.java:459) at org.drools.model.codegen.execmodel.PackageModel.generateRulesInUnit(PackageModel.java:708) at org.drools.model.codegen.execmodel.PackageModel.lambda$getRulesSource$6(PackageModel.java:596) at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4698) at org.drools.model.codegen.execmodel.PackageModel.getRulesSource(PackageModel.java:587) at org.drools.model.codegen.execmodel.PackageModelWriter.(PackageModelWriter.java:38) at org.drools.model.codegen.project.KogitoPackageSources.dumpSources(KogitoPackageSources.java:68) at org.drools.model.codegen.execmodel.processors.SourceCodeGenerationPhase.process(SourceCodeGenerationPhase.java:51) at org.drools.compiler.builder.impl.processors.IteratingPhase.process(IteratingPhase.java:56) at org.drools.model.codegen.execmodel.processors.ModelMainCompilationPhase.process(ModelMainCompilationPhase.java:103) at org.drools.model.codegen.execmodel.ModelBuilderImpl.doSecondBuildStep(ModelBuilderImpl.java:112) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:120) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:104) at org.kie.kogito.codegen.rules.DroolsModelBuilder.build(DroolsModelBuilder.java:73) ... 25 more at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330) at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252) at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60) at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:225) at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:609) at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:647) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$10(ClassBasedTestDescriptor.java:381) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:381) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:205) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:80) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148) ... 36 more Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateSources threw an exception: org.kie.kogito.codegen.rules.RuleCodegenError: Errors were generated during the code-generation process: No data of this type found. Use containsData to check for this first. at org.kie.kogito.codegen.rules.DroolsModelBuilder.build(DroolsModelBuilder.java:79) at org.kie.kogito.codegen.rules.RuleCodegen.internalGenerate(RuleCodegen.java:110) at org.kie.kogito.codegen.core.AbstractGenerator.generate(AbstractGenerator.java:69) at org.kie.kogito.codegen.core.ApplicationGenerator.lambda$generateComponents$0(ApplicationGenerator.java:99) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at org.kie.kogito.codegen.core.ApplicationGenerator.generateComponents(ApplicationGenerator.java:101) at org.kie.kogito.codegen.core.ApplicationGenerator.generate(ApplicationGenerator.java:76) at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateFiles(KogitoAssetsProcessor.java:223) at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateSources(KogitoAssetsProcessor.java:127) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:944) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) at java.base/java.lang.Thread.run(Thread.java:829) at org.jboss.threads.JBossThread.run(JBossThread.java:501) Caused by: java.lang.IllegalStateException: No data of this type found. Use containsData to check for this first. at com.github.javaparser.ast.Node.getData(Node.java:505) at com.github.javaparser.ast.CompilationUnit.getPrinter(CompilationUnit.java:154) at com.github.javaparser.ast.Node.lambda$getPrinter$1(Node.java:199) at java.base/java.util.Optional.map(Optional.java:265) at com.github.javaparser.ast.Node.getPrinter(Node.java:199) at com.github.javaparser.ast.Node.toString(Node.java:322) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.TreeMap$ValueSpliterator.forEachRemaining(TreeMap.java:2890) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:952) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:926) at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408) at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:496) at java.base/java.util.stream.IntPipeline.max(IntPipeline.java:459) at org.drools.model.codegen.execmodel.PackageModel.generateRulesInUnit(PackageModel.java:708) at org.drools.model.codegen.execmodel.PackageModel.lambda$getRulesSource$6(PackageModel.java:596) at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4698) at org.drools.model.codegen.execmodel.PackageModel.getRulesSource(PackageModel.java:587) at org.drools.model.codegen.execmodel.PackageModelWriter.(PackageModelWriter.java:38) at org.drools.model.codegen.project.KogitoPackageSources.dumpSources(KogitoPackageSources.java:68) at org.drools.model.codegen.execmodel.processors.SourceCodeGenerationPhase.process(SourceCodeGenerationPhase.java:51) at org.drools.compiler.builder.impl.processors.IteratingPhase.process(IteratingPhase.java:56) at org.drools.model.codegen.execmodel.processors.ModelMainCompilationPhase.process(ModelMainCompilationPhase.java:103) at org.drools.model.codegen.execmodel.ModelBuilderImpl.doSecondBuildStep(ModelBuilderImpl.java:112) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:120) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:104) at org.kie.kogito.codegen.rules.DroolsModelBuilder.build(DroolsModelBuilder.java:73) ... 25 more at io.quarkus.builder.Execution.run(Execution.java:116) at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79) at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:157) at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:328) ... 47 more Caused by: org.kie.kogito.codegen.rules.RuleCodegenError: Errors were generated during the code-generation process: No data of this type found. Use containsData to check for this first. at org.kie.kogito.codegen.rules.DroolsModelBuilder.build(DroolsModelBuilder.java:79) at org.kie.kogito.codegen.rules.RuleCodegen.internalGenerate(RuleCodegen.java:110) at org.kie.kogito.codegen.core.AbstractGenerator.generate(AbstractGenerator.java:69) at org.kie.kogito.codegen.core.ApplicationGenerator.lambda$generateComponents$0(ApplicationGenerator.java:99) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at org.kie.kogito.codegen.core.ApplicationGenerator.generateComponents(ApplicationGenerator.java:101) at org.kie.kogito.codegen.core.ApplicationGenerator.generate(ApplicationGenerator.java:76) at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateFiles(KogitoAssetsProcessor.java:223) at org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor.generateSources(KogitoAssetsProcessor.java:127) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:944) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) at java.base/java.lang.Thread.run(Thread.java:829) at org.jboss.threads.JBossThread.run(JBossThread.java:501) Caused by: java.lang.IllegalStateException: No data of this type found. Use containsData to check for this first. at com.github.javaparser.ast.Node.getData(Node.java:505) at com.github.javaparser.ast.CompilationUnit.getPrinter(CompilationUnit.java:154) at com.github.javaparser.ast.Node.lambda$getPrinter$1(Node.java:199) at java.base/java.util.Optional.map(Optional.java:265) at com.github.javaparser.ast.Node.getPrinter(Node.java:199) at com.github.javaparser.ast.Node.toString(Node.java:322) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.TreeMap$ValueSpliterator.forEachRemaining(TreeMap.java:2890) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:952) at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:926) at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408) at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233) at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:496) at java.base/java.util.stream.IntPipeline.max(IntPipeline.java:459) at org.drools.model.codegen.execmodel.PackageModel.generateRulesInUnit(PackageModel.java:708) at org.drools.model.codegen.execmodel.PackageModel.lambda$getRulesSource$6(PackageModel.java:596) at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4698) at org.drools.model.codegen.execmodel.PackageModel.getRulesSource(PackageModel.java:587) at org.drools.model.codegen.execmodel.PackageModelWriter.(PackageModelWriter.java:38) at org.drools.model.codegen.project.KogitoPackageSources.dumpSources(KogitoPackageSources.java:68) at org.drools.model.codegen.execmodel.processors.SourceCodeGenerationPhase.process(SourceCodeGenerationPhase.java:51) at org.drools.compiler.builder.impl.processors.IteratingPhase.process(IteratingPhase.java:56) at org.drools.model.codegen.execmodel.processors.ModelMainCompilationPhase.process(ModelMainCompilationPhase.java:103) at org.drools.model.codegen.execmodel.ModelBuilderImpl.doSecondBuildStep(ModelBuilderImpl.java:112) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:120) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:104) at org.kie.kogito.codegen.rules.DroolsModelBuilder.build(DroolsModelBuilder.java:73) ... 25 more |
*/ | ||
package org.kie.efesto.common.utils; | ||
|
||
public class StringUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: the methods in this class have nothing to do with plain Strings, but all involves some sort of names manipulation for packages and classes. Maybe change the name accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco I do not have a better idea right now: provided that there are at least other two PRs ready, may we merge this, and fix the name of this class in the following one (that I would like to merge tomorrow, if possible ) ?
* @return stream of matching resources | ||
* @throws IOException | ||
*/ | ||
public static Stream<File> getResourcesFromDirectory(File directory, Pattern pattern) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick and very questionable: in general I don't think it is never a good idea to return a Stream
from a method because storing it in variables and passing it around increases considerably the possibility to call a terminal operation on it twice and you will discover the problem only at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco
Looked around, good suggestion, but a "bigger" fix is needed.
See https://issues.redhat.com/browse/DROOLS-7039
/** | ||
* This is the output of an engine-compilation. It could be a processed object (i.e. a final step) or an intermediate resource | ||
*/ | ||
public interface EfestoCompilationOutput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be useful to remark the difference between an intermediate and a final step output with 2 subinterfaces or even with a method returning a boolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco For the moment being I do not see the need for two interfaces:
- there already is an "abstraction": EfestoRedirectOutput
- the API itself does not need that: to make a sensible use of them we should duplicate methods, but soon after that there will be a matrix duplication of other called methods
- returning a boolean would duplicate the same logic that is inherently implied on the type itself (i.e. the "final output" would return "true" and the "intermediate" would return false: this does not add nothing to the overall information carried on, but make it more contrived)
* @param toProcess | ||
* @return | ||
*/ | ||
List<IndexFile> processResource(EfestoResource toProcess, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor improvement: what about having one single method with signature
List<IndexFile> processResources(
KieMemoryCompiler.MemoryCompilerClassLoader memoryCompilerClassLoader,
EfestoResource... toProcess) ;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also do we need something specific as the KieMemoryCompiler.MemoryCompilerClassLoader
here? Couldn't it be a generic ClassLoader
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco
I like this, thanks for suggestion 😄
} | ||
|
||
private static Iterator<KieCompilerService> getServices(boolean refresh) { | ||
if (refresh) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this refresh
argument? In which case a new service could be plugged it dynamically? (if I'm understanding correctly the meaning of this).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco
The ability to refresh is one out-of-the-box benefits of the plugin architecture (i.e. dynamic pluggin in/replacement): is there an urgent technical need to remove that ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco
For the moment being I'll keep the code but I'll set default to false
} | ||
|
||
@Override | ||
public List<IndexFile> processResources(List<EfestoResource> toProcess, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the signature of this method should return a Collection<IndexFile>
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco
I would like to be sure to return a List - that is anyway an interface but with some specific methods.
In general I think "Collection" is a too broad interface, that hides useful methods, and anyway rely on the underlying implementation (i.e.: if you do not want duplicates, you have to use a Set; if you want ordered collection, you need a list, etc. etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco done
@Override | ||
public List<IndexFile> processResources(List<EfestoResource> toProcess, | ||
KieMemoryCompiler.MemoryCompilerClassLoader memoryCompilerClassLoader) { | ||
List<IndexFile> toReturn = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... in this way you could use a Set
here ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco
... yes - Set could be an alternative....
toProcess.forEach(efestoResource -> { | ||
List<IndexFile> partial = processResource(efestoResource, memoryCompilerClassLoader); | ||
partial.forEach(partialIndexFile -> { | ||
if (!toReturn.contains(partialIndexFile)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and avoid this check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.warn("Cannot find KieCompilerService for {}", toProcess.getClass()); | ||
return; | ||
} | ||
Optional<List<EfestoCompilationOutput>> darCompilationOutputOptional = retrieved.map(service -> service.processResource(toProcess, memoryCompilerClassLoader)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: darCompilationOutputOptional
to be renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco done
return Optional.empty(); | ||
} | ||
KieRuntimeService kieRuntimeService = retrieved.get(); | ||
return kieRuntimeService.evaluateInput(toEvaluate, memoryCompilerClassLoader); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another nitpick (sorry), I believe that the Optional could be used in a more idiomatic way like:
retrived.map( krs -> krs.evaluateInput(toEvaluate, memoryCompilerClassLoader) ).orElseGet( () -> {
logger.warn("Cannot find KieRuntimeService for {}", toEvaluate.getFRI());
return Optional.empty();
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariofusco
Thanks for suggestion, but my goal was to differentiate the "Optional.empty" get from kieRuntimeService.evaluateInput, and the Optional.empty get from getKieRuntimeService.
If I'm not wrong, in both case the code would enter the "else get", without differentiating them, i.e., it would print ""Cannot find KieRuntimeService for {}" even if the KieRuntimeService has been found: am I wrong ?
* @param toPopulate | ||
* @param methodDeclarations | ||
*/ | ||
public static void populateMethodDeclarations(final ClassOrInterfaceDeclaration toPopulate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method doesn't seem to be used (and also it's a bit questionable but this is very personal). I didn't check if there are other methods in this class that are not in use, but I guess so.
SonarCloud Quality Gate failed. |
<relativePath>../kie-core-bom/pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>efesto-bom</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not create a new different bom but add the modules to the existing kie-core-bom
. I don't expect efesto-bom
to be used directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielezonca
For the moment being I think it is better to keep it "isolated" - there will be new modules add/renamed/removed, and make all this modifications inside that specific bom would ease keeping track.
@mariofusco @danielezonca |
* [DROOLS-7025] Fixing ignores * [DROOLS-7025] Fixing ignores - update README * [DROOLS-7025] Fixing module name * [DROOLS-7025] Fix README.md as per PR suggestion * [DROOLS-7025] Fixing dependencies * [DROOLS-7025] Disabling jacoco inside efesto/pmml-engine * [DROOLS-7025] Disabling generate-aggregated-jacoco-report inside efesto/pmml-engine * [DROOLS-6918] Introducing Efesto. Build works. Tests not verified. * [DROOLS-6918] Add MiningModelWithDrl.plantuml * [DROOLS-6918] Cleanup - begun RuntimePmmlTest * [DROOLS-6918] Minor fix on pom names * [DROOLS-7025] Fixing ignores * [DROOLS-7025] Fixing ignores - update README * [DROOLS-7025] Fixing module name * [DROOLS-7025] Fix README.md as per PR suggestion * [DROOLS-7025] Fixing dependencies * [DROOLS-7025] Disabling jacoco inside efesto/pmml-engine * [DROOLS-7025] Disabling generate-aggregated-jacoco-report inside efesto/pmml-engine * [DROOLS-7025] Move efesto inside drools repo * [DROOLS-7025] Remove misleading sentence * Update efesto/efesto-core/Readme.md Co-authored-by: Daniele Zonca <dzonca@redhat.com> * Update efesto/efesto-core/Readme.md Co-authored-by: Daniele Zonca <dzonca@redhat.com> * [DROOLS-7025] Fix as per PR suggestion * [DROOLS-7025] Fixed as per PR suggestion Co-authored-by: Daniele Zonca <dzonca@redhat.com>
@mariofusco @evacchi @tarilabs @pibizza @tkobayas @mdproctor @danielezonca
JIRA:
link
Relevant links:
https://docs.google.com/document/d/1n9rKcMh0qnP7R4DUb3xqanFZcN0q7SL8aBRoAdQDSH0
https://miro.com/app/board/uXjVO3fJxsY=/
Please feel free to directly ping me for any doubt/question
See discussion here https://github.com/kiegroup/drools/pull/4478
How to replicate CI configuration locally?
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 to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool 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 details to get more information about it.
How to retest this PR or trigger a specific build:
for pull request checks
Please add comment: Jenkins retest this
for a specific pull request check
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] tests
for a full downstream build
run_fdb
a compile downstream build please add comment: Jenkins run cdb
a full production downstream build please add comment: Jenkins execute product fdb
an upstream build please add comment: Jenkins run upstream
for quarkus branch checks
Run checks against Quarkus current used branch
Please add comment: Jenkins run quarkus-branch
for a quarkus branch specific check
Run checks against Quarkus current used branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-branch
for quarkus main checks
Run checks against Quarkus main branch
Please add comment: Jenkins run quarkus-main
for a specific quarkus main check
Run checks against Quarkus main branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-branch
for native checks
Run native checks
Please add comment: Jenkins run native
for a specific native check
Run native checks
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] native
for mandrel checks
Run native checks against Mandrel image
Please add comment: Jenkins run mandrel
for a specific mandrel check
Run native checks against Mandrel image
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] mandrel