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

[DROOLS-6627] Verify Scorecard reasoncode when result is null #3875

Merged
merged 23 commits into from
Oct 6, 2021

Conversation

gitgabrio
Copy link
Contributor

@danielezonca @kostola @jiripetrlik

See https://issues.redhat.com/browse/DROOLS-6627

Please note there is an underlying issue not completely fixed, i.e. the "status" of "KiePMMLModel" that it is preserved between multiple invocation.

The overall fix will require a global refactor, and will be addressed by https://issues.redhat.com/browse/DROOLS-6641

This PR must be merged after https://github.com/kiegroup/drools/pull/3868

# Conflicts:
#	kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/builders/KiePMMLModelCodegenUtilsTest.java
#	kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLModelFactoryUtilsTest.java
# Conflicts:
#	kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/builders/KiePMMLModelCodegenUtilsTest.java
#	kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/codegenfactories/KiePMMLModelFactoryUtilsTest.java
#	kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/commons/model/KiePMMLDroolsModel.java
# Conflicts:
#	kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/builders/KiePMMLModelCodegenUtilsTest.java
# Conflicts:
#	kie-pmml-trusty/kie-pmml-compiler/kie-pmml-compiler-commons/src/test/java/org/kie/pmml/compiler/commons/builders/KiePMMLModelCodegenUtilsTest.java
@gitgabrio gitgabrio marked this pull request as ready for review October 5, 2021 13:51
KiePMMLSessionUtils.Builder builder = KiePMMLSessionUtils.builder((KieBase) knowledgeBase, name, packageName,
toReturn)
.withObjectsInSession(requestData, fieldTypeMap)
.withOutputFieldsMap(outputFieldsMap);
.withOutputFieldsMap(holder);
outputFieldsMap = holder;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary? I don't usually like a method that changes the instance of a field. Isn't possible to do
outpitFieldsMap.putAll(output)
?
Or do a clear() if necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reasonCodeAlgorithm,
useReasonCodes,
baselineScore).orElse(null);
outputFieldsMap = holder;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same 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.

@sonarcloud
Copy link

sonarcloud bot commented Oct 6, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@danielezonca danielezonca merged commit b40751b into apache:7.x Oct 6, 2021
gitgabrio added a commit to gitgabrio/drools that referenced this pull request Oct 6, 2021
…#3875)

* [DROOLS-6625] Managing missing "required" input data

* [DROOLS-6625] Managing best-effort conversion of input data

* [DROOLS-6625] Managing invalid values - TODO: integration tests

* [DROOLS-6625] Managing invalid values

* [DROOLS-6625] Managing missing values

* [DROOLS-6625] Validate input data

* [DROOLS-6635] Move testing sources in specific files

* [DROOLS-6625] Fix merge with base branch

* [DROOLS-6625] Fix as per PR suggestion

* [DROOLS-6635] Fix merge

* [DROOLS-6627] Verify Scorecard reasoncode when result is null

* [DROOLS-6635] Fix merge with 7.x

* [DROOLS-6627] Fix merge

* [DROOLS-6627] Fixed as per PR request
danielezonca pushed a commit that referenced this pull request Oct 7, 2021
…#3883)

* [DROOLS-6625] Managing missing "required" input data

* [DROOLS-6625] Managing best-effort conversion of input data

* [DROOLS-6625] Managing invalid values - TODO: integration tests

* [DROOLS-6625] Managing invalid values

* [DROOLS-6625] Managing missing values

* [DROOLS-6625] Validate input data

* [DROOLS-6635] Move testing sources in specific files

* [DROOLS-6625] Fix merge with base branch

* [DROOLS-6625] Fix as per PR suggestion

* [DROOLS-6635] Fix merge

* [DROOLS-6627] Verify Scorecard reasoncode when result is null

* [DROOLS-6635] Fix merge with 7.x

* [DROOLS-6627] Fix merge

* [DROOLS-6627] Fixed as per PR request
@gitgabrio gitgabrio deleted the DROOLS-6627 branch October 8, 2021 08:28
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.

3 participants