Skip to content
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

Dispose KieSession after rules execution when using ruleFlowGroup #3678

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

martinweiler
Copy link
Contributor

Copy link
Contributor

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -73,6 +73,9 @@ public void evaluate(RuleSetNodeInstance rsni, String ruleFlowGroup) {
rsni.removeEventListeners();
rsni.retractFacts(kruntime);
rsni.triggerCompleted();
if (kruntime instanceof org.drools.kiesession.session.StatefulKnowledgeSessionImpl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not understanding why the instanceof is performed against the concrete class instead of simply checking the KieSession interface here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the input @mariofusco

Copy link
Contributor

@elguardian elguardian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ok for me. We don't use the old engine anymore in prod.

@kie-ci3
Copy link
Contributor

kie-ci3 commented Sep 23, 2024

PR job #2 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3678 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3678/2/display/redirect

Test results:

  • PASSED: 3319
  • FAILED: 5

Those are the test failures:

org.jbpm.bpmn2.IntermediateEventTest.testEventBasedSplit2
expected: 2
but was: 1
org.kie.kogito.integrationtests.quarkus.reactive.ProcessSvgAddonIT.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval
org.kie.kogito.integrationtests.quarkus.ProcessSvgAddonIT.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval
org.kie.kogito.svg.service.SpringBootProcessSvgServiceTest.annotateExecutedPathTest
Expecting value to be false but was true
org.kie.kogito.integrationtests.springboot.ProcessSvgAddonTest.testGetSvgProcessInstances 1 expectation failed.
Response body doesn't match expectation.
Expected: Expected namespace uri 'http://www.w3.org/2000/svg' but was 'null' - comparing at /svg[1]/defs[1] to at /svg[1]/defs[1]:

Actual:

EndStartProcessSecond Line Approval First Line Approval

@martinweiler
Copy link
Contributor Author

The test failures are unrelated and are currently showing up on other PRs as well.

@martinweiler martinweiler merged commit 5810447 into apache:main Sep 24, 2024
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak with BusinessRulesTaskHandler using drl files
6 participants