-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[DROOLS-7195] Modify syntax fails when using executable model, works … #4846
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
Conversation
|
Can one of the admins verify this patch? |
1 similar comment
|
Can one of the admins verify this patch? |
|
(tests) - kogito-apps job Test results:
Those are the test failures: org.kie.kogito.index.ProcessDataIndexOracleIT.testProcessInstanceEventsjava.lang.AssertionError:1 expectation failed. JSON path data.UserTaskInstances[0].comments.size() doesn't match. Expected: is <1> Actual: <0> |
…with mvel runtime (nested properties)
| */ | ||
| public class PreprocessPhase { | ||
|
|
||
| private final boolean failOnEmptyRootScope; |
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.
@mariofusco I removed this failOnEmptyRootScope instance field flag, because PreprocessPhase is used by both ModifyCompiler and MvelCompiler. MvelCompiler deals with whole RHS but the flag should be effective only during parsing modify block. So I changed the flag to a method parameter boolean modify for addScopeToMethodCallExpr and assignToFieldAccess. I think this is cleaner.
| if (!modify) { | ||
| // with(){} doesn't need to replace with FieldAccess | ||
| return e; | ||
| } |
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.
@mariofusco Can we drop with statement support in Drools 8? It's not written in docs (TBH, I don't know when we want to use with) and I haven't seen it in users' DRLs. If we can drop, this code could be simplified. WDYT?
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.
Not sure if we have any test covering it, anyway yes, feel free to drop it and also do the same with an eventual test.
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. I have removed related codes and tests. Also mentioned it in the next release notes.
|
(tests) - kogito-apps job Test results:
Those are the test failures: Build projects / org.kie.kogito.it.jobs.ProcessAsyncIT.testAsyncjava.lang.AssertionError:1 expectation failed. JSON path hello doesn't match. Expected: null Actual: Hello Tiago |
|
GHA Optaplanner ubuntu Java 11: Not related to this PR kogito-apps: Flaky test |
hellowdan
left a comment
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.
If there's a plan to backport it to 7.67.x too, I think that it would be nice to have a linked RHPAM issue so we can keep better tracking of the release changes. @tkobayas WDYT?
This issue is not reported by a customer case, so I'll not backport this to 7.67.x. But I'll backport this to 7.x branch for potential future community 7.x releases. |
|
@mariofusco Please merge this PR, thanks! |
apache#4846) * [DROOLS-7195] Modify syntax fails when using executable model, works with mvel runtime (nested properties) * - Dropping 'with' statement support
|
Kudos, SonarCloud Quality Gate passed! |
…s modify in if-block (#8) * [DROOLS-7195] Modify syntax fails when using executable model, works … (apache#4846) (apache#4868) * [DROOLS-7195] Modify syntax fails when using executable model, works with mvel runtime (nested properties) * - Dropping 'with' statement support * [DROOLS-7493] [DROOLS-7497] executable model wrongly rewrites modify in if-block (apache#5380) * [DROOLS-7493] executable model wrongly rewrites modify in if-block - Additional tests to cover setter order for properperty reactivity [DROOLS-7497] * - analyze whole RHS and make all modification as property reactive * - Add docs about fact modification after modify or update in RHS * - fixing code smells
…s modify in if-block (#8) (#9) * [DROOLS-7195] Modify syntax fails when using executable model, works … (apache#4846) (apache#4868) * [DROOLS-7195] Modify syntax fails when using executable model, works with mvel runtime (nested properties) * - Dropping 'with' statement support * [DROOLS-7493] [DROOLS-7497] executable model wrongly rewrites modify in if-block (apache#5380) * [DROOLS-7493] executable model wrongly rewrites modify in if-block - Additional tests to cover setter order for properperty reactivity [DROOLS-7497] * - analyze whole RHS and make all modification as property reactive * - Add docs about fact modification after modify or update in RHS * - fixing code smells








…with mvel runtime (nested properties)
Ports
This is a PR for main.
for 7.x -> https://github.com/kiegroup/drools/pull/4868
JIRA:
https://issues.redhat.com/browse/DROOLS-7195
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 checks
Please add comment: Jenkins retest this
for a specific pull request check
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] tests
for a full downstream build
run_fdba compile downstream build please add comment: Jenkins run cdb
a full production downstream build please add comment: Jenkins execute product fdb
an upstream build please add comment: Jenkins run upstream
for quarkus branch checks
Run checks against Quarkus current used branch
Please add comment: Jenkins run quarkus-branch
for a quarkus branch specific check
Run checks against Quarkus current used branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-branch
for quarkus main checks
Run checks against Quarkus main branch
Please add comment: Jenkins run quarkus-main
for a specific quarkus main check
Run checks against Quarkus main branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-main
for quarkus lts checks
Run checks against Quarkus lts branch
Please add comment: Jenkins run quarkus-lts
for a specific quarkus lts check
Run checks against Quarkus lts branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] quarkus-lts
for native checks
Run native checks
Please add comment: Jenkins run native
for a specific native check
Run native checks
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] native
for mandrel checks
Run native checks against Mandrel image
Please add comment: Jenkins run mandrel
for a specific mandrel check
Run native checks against Mandrel image
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] mandrel
for mandrel lts checks
Run native checks against Mandrel image and quarkus lts branch
Please add comment: Jenkins run mandrel-lts
for a specific mandrel lts check
Run native checks against Mandrel image and quarkus lts branch
Please add comment: Jenkins (re)run [drools|kogito-runtimes|kogito-apps|kogito-examples] mandrel-lts