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

[Incubator-kie-issues#1356] DMN Elements with null IDs are not correctly managed #6033

Merged
merged 4 commits into from
Aug 1, 2024

Conversation

gitgabrio
Copy link
Contributor

Fixes apache/incubator-kie-issues#1356

@bncriju

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

    • Push a new commit to the PR. An empty commit would be enough.
  • for a full downstream build

    • for github actions job: add the label run_fdb
  • for Jenkins PR check only

@yesamer yesamer added the DMN label Jul 29, 2024
Copy link
Contributor

@yesamer yesamer left a comment

Choose a reason for hiding this comment

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

With this PR you solve 24 TCK Tests.
Unfortunately, it introduced a regression.
This is the case failing after applying the changes
https://github.com/dmn-tck/tck/tree/master/TestCases/compliance-level-3/0089-nested-inputdata-imports
It seems related to Imported DMN.

`09:39:26.768 [main] ERROR org.kie.dmn.core.util.MsgUtil.logMessage:83 - Required import not found: {http://www.trisotech.com/definitions/_ae5b3c17-1ac3-4e1d-b4f9-2cf861aec6d9}Say hello 1ID1D for node 'Model C'; missing DMN Import name alias.
09:39:26.769 [main] ERROR org.kie.dmn.core.util.MsgUtil.logMessage:83 - Required dependency 'Person name' not found on node 'Greet the Person'
09:39:26.769 [main] INFO o.o.d.t.runner.drools.DroolsTCKTest.executeTest:271 - Messages:

Message [id=0, level=ERROR, path=/Users/yamer/Projects/tck/runners/dmn-tck-runner-drools/../../TestCases/compliance-level-3/0089-nested-inputdata-imports/0089-nested-inputdata-imports.dmn, line=19, column=-1
text=DMN: Required import not found: {http://www.trisotech.com/definitions/_ae5b3c17-1ac3-4e1d-b4f9-2cf861aec6d9}Say hello 1ID1D for node 'Model C'; missing DMN Import name alias. (DMN id: _10435dcd-8774-4575-a338-49dd554a0928, The referenced import was not found) ]
Message [id=0, level=ERROR, path=/Users/yamer/Projects/tck/runners/dmn-tck-runner-drools/../../TestCases/compliance-level-3/0089-nested-inputdata-imports/0089-nested-inputdata-imports.dmn, line=21, column=-1
text=DMN: Required dependency 'Person name' not found on node 'Greet the Person' (DMN id: _f7fdaec4-d669-4797-b3b4-12b860de2eb5, The referenced node was not found) ]

09:39:26.770 [main] INFO o.o.d.t.runner.drools.DroolsTCKTest.executeTest:310 - Result context: {
Model B: null
Model B2: null
modelA: {
}
}`

In addition, there are unneeded changes in the file's headers

String name = "name";
String wrongName = "wrong-name";
String retrieved = TupleIdentifier.generateIdFromName(name);
assertEquals(retrieved, TupleIdentifier.generateIdFromName(name));
Copy link
Contributor

Choose a reason for hiding this comment

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

If possible use assertj to perform assertions. We have made in the past a rather large effort to use only assertj in drools to do assertions.

@yesamer yesamer self-requested a review July 31, 2024 08:01
@yesamer
Copy link
Contributor

yesamer commented Jul 31, 2024

@gitgabrio 24 TCK Tests are now green. Well done!

Copy link
Contributor

@yesamer yesamer left a comment

Choose a reason for hiding this comment

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

LGTM

@gitgabrio gitgabrio merged commit fed30f8 into apache:main Aug 1, 2024
10 checks passed
@gitgabrio gitgabrio deleted the incubator-kie-issues#1356 branch August 1, 2024 10:04
rgdoliveira pushed a commit to rgdoliveira/drools that referenced this pull request Aug 6, 2024
…tly managed (apache#6033)

* [incubator-kie-issues#1356] Implemented TupleIdentifier as key for nods maps inside DMNModelImpl

* [incubator-kie-issues#1356] Working with tests

* [incubator-kie-issues#1356] Fix null management inside TupleIdentifier. Add  tests.

* [incubator-kie-issues#1356] Add symmetrical equality tests for TupleIdentifier

---------

Co-authored-by: Gabriele-Cardosi <[email protected]>
rodrigonull pushed a commit to rodrigonull/incubator-kie-drools that referenced this pull request Oct 7, 2024
…tly managed (apache#6033)

* [incubator-kie-issues#1356] Implemented TupleIdentifier as key for nods maps inside DMNModelImpl

* [incubator-kie-issues#1356] Working with tests

* [incubator-kie-issues#1356] Fix null management inside TupleIdentifier. Add  tests.

* [incubator-kie-issues#1356] Add symmetrical equality tests for TupleIdentifier

---------

Co-authored-by: Gabriele-Cardosi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DMN Elements with null IDs are not correctly managed
4 participants