-
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
kie-issues#1541: Add testing models into kie-dmn-test-resources #6135
Conversation
This PR is related to: apache/incubator-kie-kogito-apps#2120 where we are adding new unit tests using DMN models from the drools/kie-dmn/kie-dmn-test-resources
@@ -0,0 +1,94 @@ | |||
<?xml version="1.0" encoding="UTF-8" ?> |
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 think it would be better a more descriptive name for the model: what about something like "MultipleHitRules" - or similar ?
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 agree with the proposed name. Will push the change shortly.
@@ -0,0 +1,328 @@ | |||
<?xml version="1.0" encoding="UTF-8" ?> |
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.
Thanks @jomarko
But this model is already present: see RiskScore_Simple.
Please correct me if the two are semantically different
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.
They are semantically slightly different.
The existing RiskScore_Simple
contains two Decision nodes in a sequence. Firstly, a decision table is evaluated in the first decision node and then the model proceeds to the second decision node, where a conditional expression is evaluated.
The new RiskScore_Conditional
contains a single Decision node, where expressions are nested so it is Risk Score: {if: (condition), then: {DecisionTable 1}, else: {DecisionTable 2}}
I see this model as useful to demonstrate evaluationHitIds
are returned for all levels of the expressions - we return as conditional branch id, so decision table rule id.
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.
Thank you for review.
@@ -0,0 +1,328 @@ | |||
<?xml version="1.0" encoding="UTF-8" ?> |
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.
They are semantically slightly different.
The existing RiskScore_Simple
contains two Decision nodes in a sequence. Firstly, a decision table is evaluated in the first decision node and then the model proceeds to the second decision node, where a conditional expression is evaluated.
The new RiskScore_Conditional
contains a single Decision node, where expressions are nested so it is Risk Score: {if: (condition), then: {DecisionTable 1}, else: {DecisionTable 2}}
I see this model as useful to demonstrate evaluationHitIds
are returned for all levels of the expressions - we return as conditional branch id, so decision table rule id.
@@ -0,0 +1,94 @@ | |||
<?xml version="1.0" encoding="UTF-8" ?> |
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 agree with the proposed name. Will push the change shortly.
PR job Reproducerbuild-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-drools -u #6135 --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/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6135/1/display/redirect Test results:
Those are the test failures: org.kie.dmn.validation.ValidatorTest.validateAllValidSharedModelsExpecting empty but was: [Message [id=0, level=WARNING, path=valid_models/DMNv1_5/Collections.dmn, line=28, column=-1 text=DMN: Decision table with single output on node 'Statistics' should not have output name (DMN id: _BAB25151-3529-4601-9BB0-B221F29887C0, The referenced element should not have a name set) ]] |
PR job Reproducerbuild-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-drools -u #6135 --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/drools/job/main/job/pullrequest_jobs/job/drools-pr/job/PR-6135/2/display/redirect Test results:
Those are the test failures: org.kie.dmn.validation.ValidatorTest.validateAllValidSharedModelsExpecting empty but was: [Message [id=0, level=WARNING, path=valid_models/DMNv1_5/MultipleHitRules.dmn, line=28, column=-1 text=DMN: Decision table with single output on node 'Statistics' should not have output name (DMN id: _BAB25151-3529-4601-9BB0-B221F29887C0, The referenced element should not have a name set) ]] |
…he#6135) * kie-issues#1541: Add testing models into kie-dmn-test-resources This PR is related to: apache/incubator-kie-kogito-apps#2120 where we are adding new unit tests using DMN models from the drools/kie-dmn/kie-dmn-test-resources * Collections.dmn -> MultipleHitRules.dmn * Remove <output/> name attribute
This PR is related to: apache/incubator-kie-kogito-apps#2120 where we are adding new unit tests using DMN models from the drools/kie-dmn/kie-dmn-test-resources
Thank you for submitting this pull request
NOTE!: Double-check the target branch for this PR.
The default is
main
so it will target Drools 8 / Kogito.Ports If a forward-port or a backport is needed, paste the forward port PR here
Issue: (please edit the GitHub Issues link if it exists)
referenced Pull Requests: (please edit the URLs of referenced pullrequests if they exist)
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 and downstream checks
for a full downstream build
run_fdb
for Jenkins PR check only
Build Now
button.