-
Notifications
You must be signed in to change notification settings - Fork 213
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
Fix usage of DMN 1.5 for tracing-enabled applications inside maven plugin code-gen #3823
base: main
Are you sure you want to change the base?
Conversation
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-kogito-runtimes -u #3823 --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-3823/1/display/redirect Test results:
Those are the test failures: org.kie.kogito.codegen.decision.DecisionCloudEventMetaFactoryGeneratorTest.testGenerateWithCloudEventsDisabledDMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCloudEventMetaFactoryGeneratorTest.testGenerateWithCloudEventsEnabledDMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.generateAllFiles(Builder)[1]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.generateAllFiles(Builder)[2]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.generateAllFiles(Builder)[3]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringIsActiveButDashboardsDeactivatedThenGrafanaDashboardsAreNotGenerated(Builder)[1]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringIsActiveButDashboardsDeactivatedThenGrafanaDashboardsAreNotGenerated(Builder)[2]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringIsActiveButDashboardsDeactivatedThenGrafanaDashboardsAreNotGenerated(Builder)[3]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringIsActiveThenGrafanaDashboardsAreGenerated(Builder)[1]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringIsActiveThenGrafanaDashboardsAreGenerated(Builder)[2]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringIsActiveThenGrafanaDashboardsAreGenerated(Builder)[3]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringAndTracingAreActiveThenTheGrafanaDashboardsContainsTheAuditUILink(Builder)[1]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringAndTracingAreActiveThenTheGrafanaDashboardsContainsTheAuditUILink(Builder)[2]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.givenADMNModelWhenMonitoringAndTracingAreActiveThenTheGrafanaDashboardsContainsTheAuditUILink(Builder)[3]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.isEmpty(Builder)[1]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.isEmpty(Builder)[2]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionCodegenTest.isEmpty(Builder)[3]DMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) org.kie.kogito.codegen.decision.DecisionModelResourcesProviderGeneratorTest.generateDecisionModelResourcesProviderDMN Validation schema and model validation contained errorsYou may configure kogito.decisions.validation=IGNORE to ignore validation errors DMN Validation errors: : DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) , : DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model) |
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 PR @porcelli
|
||
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="decision" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" id="_9efe7fc6-f41b-422c-accd-95dcaaa67a39" name="Vacations" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="decision"> | ||
<dmn:extensionElements/> | ||
<?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.
failed tests seems to be related to this :
DMN Validation schema and model validation contained errors
You may configure kogito.decisions.validation=IGNORE to ignore validation errors
DMN Validation errors:
: DMN: Failed XML validation of DMN file: /home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3823/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/kogito-codegen-modules/kogito-codegen-decisions/src/test/resources/decision/models/vacationDays/vacationDays.dmn - The processing instruction target matching "[xX][mM][lL]" is not allowed. (DMN model failed XML schema validation) ,
: DMN: One of the supplied DMN Models has failed validation; cannot proceed to validation of the remaining DMN Models. (DMN Validation stopped on failed validation for some DMN Model)
|
||
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="decision" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" id="_9efe7fc6-f41b-422c-accd-95dcaaa67a39" name="Vacations" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="decision"> | ||
<dmn:extensionElements/> | ||
<?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.
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.
@gitgabrio @porcelli @jomarko Indeed we need to investigate this, as far as I know, the prolog should be correctly validated. When creating a new dmn file in our editor, the prolog is automatically added.
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.
Yes, should be there. It is also part of e.g. DMN TCK test files, like e.g. here (1).
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.
Ok, just double checked, the "?xml" tag should be before the license header, as very first line.
@porcelli
(no need of anything else, apparently) |
Could you pls try with: private String extractModelVersion(DMNResource resource) {
String toReturn = resource.getDmnModel().getDefinitions().getTypeLanguage();
if (toReturn == null || toReturn.isEmpty()) {
LOGGER.error("Could not extract DMN version from DMN model {}", resource.getDmnModel().getName());
throw new IllegalStateException("The DMN model does not contain a unique model version in the metadata.");
}
return toReturn;
} so that the CI will check it also downstream ? |
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.
Thx @porcelli
Reading your modification and debugging it thoroughly., it seems that the logic of that method is inherently wrong, as I explained.
Since you are already modifying it, it does not make sense to "maintain" a tech debt instead of fixing it once and for all, IMO.
Thanks @porcelli ! @baldimir @jstastny-cz any idea ? |
@porcelli @gitgabrio
Weird, as there are no new imported classes in DecisionModelResourcesProviderGenerator.java, maybe there's an unused import? |
Thanks @yesamer 👏 |
Closes: apache/incubator-kie-issues#1740