[JBoss JIRA] (DROOLS-5231) Wrong BitMask created by a nested property in modify block
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5231?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi commented on DROOLS-5231:
-------------------------------------------
Fixed by https://github.com/kiegroup/drools/commit/fc924465437919d5b6bd99849ee595e...
> Wrong BitMask created by a nested property in modify block
> ----------------------------------------------------------
>
> Key: DROOLS-5231
> URL: https://issues.redhat.com/browse/DROOLS-5231
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.35.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
> Fix For: 7.37.0.Final
>
>
> When a nested property is modified in modify block like this:
> {noformat}
> rule R1
> when
> $pet : Pet(age == 3)
> then
> modify ($pet) { getOwner().setLikes("Cookie") };
> end
> {noformat}
> executable model creates BitMask for "owner" and "likes" thus causes a build error.
> {noformat}
> [ERROR] testNestedPropInRHS[PATTERN_DSL](org.drools.modelcompiler.PropertyReactivityTest) Time elapsed: 2.702 s <<< ERROR!
> java.lang.RuntimeException: Unknown property 'likes' for class class class org.drools.modelcompiler.domain.Pet
> at org.drools.test.DomainClassesMetadata9429289867DBA6AE1EE0D6F3F6F68A4D$org_drools_modelcompiler_domain_Pet_Metadata.getPropertyIndex(DomainClassesMetadata9429289867DBA6AE1EE0D6F3F6F68A4D.java:24)
> at org.drools.model.bitmask.BitMaskUtil.calculatePatternMask(BitMaskUtil.java:61)
> at org.drools.model.BitMask.getPatternMask(BitMask.java:54)
> at org.drools.test.Rules9429289867DBA6AE1EE0D6F3F6F68A4DRuleMethods0.rule_R1(Rules9429289867DBA6AE1EE0D6F3F6F68A4DRuleMethods0.java:24)
> at org.drools.test.Rules9429289867DBA6AE1EE0D6F3F6F68A4D.getRulesList(Rules9429289867DBA6AE1EE0D6F3F6F68A4D.java:60)
> at org.drools.test.Rules9429289867DBA6AE1EE0D6F3F6F68A4D.<init>(Rules9429289867DBA6AE1EE0D6F3F6F68A4D.java:64)
> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
> at java.base/java.lang.Class.newInstance(Class.java:584)
> at org.drools.modelcompiler.CanonicalKieModule.createInstance(CanonicalKieModule.java:410)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (DROOLS-5028) Support incremental update for function with executable model
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5028?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi commented on DROOLS-5028:
-------------------------------------------
Fixed by https://github.com/kiegroup/drools/commit/f526afbe18c947a50e91a2b361673ba...
> Support incremental update for function with executable model
> -------------------------------------------------------------
>
> Key: DROOLS-5028
> URL: https://issues.redhat.com/browse/DROOLS-5028
> Project: Drools
> Issue Type: Task
> Components: executable model
> Affects Versions: 7.32.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
> Labels: good-first-issue
>
> When you do incremental compilation with executable model, if a function is updated, you will get this error.
> {noformat}
> [ERROR] testKJarUpgradeWithChangedFunction[PATTERN_DSL](org.drools.modelcompiler.IncrementalCompilationTest) Time elapsed: 2.682 s <<< ERROR!
> java.lang.IllegalArgumentException: Unsupported change type: function!
> at org.drools.modelcompiler.builder.CanonicalKieBaseUpdater.run(CanonicalKieBaseUpdater.java:148)
> at org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:745)
> at org.drools.compiler.kie.builder.impl.KieContainerImpl.update(KieContainerImpl.java:266)
> at org.drools.compiler.kie.builder.impl.KieContainerImpl.update(KieContainerImpl.java:236)
> at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:194)
> at org.drools.modelcompiler.IncrementalCompilationTest.testKJarUpgradeWithChangedFunction(IncrementalCompilationTest.java:359)
> ...
> {noformat}
> This is an explicit limitation at the moment but I filed this JIRA to support a function update.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFCORE-4908) The write-attribute operation does not work on a hosts JVM resource
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFCORE-4908?page=com.atlassian.jira.plug... ]
Brian Stansberry reassigned WFCORE-4908:
----------------------------------------
Assignee: Brian Stansberry (was: Jeff Mesnil)
> The write-attribute operation does not work on a hosts JVM resource
> -------------------------------------------------------------------
>
> Key: WFCORE-4908
> URL: https://issues.redhat.com/browse/WFCORE-4908
> Project: WildFly Core
> Issue Type: Bug
> Components: Management
> Reporter: James Perkins
> Assignee: Brian Stansberry
> Priority: Major
> Labels: domain-mode
>
> Under a hosts server config, {{/host=master/server-config=server-one/}}, there is a {{jvm}} resource. On this resource the {{write-attribute}} operation does not work expected.
> {code}
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:add
> {
> "outcome" => "success",
> "result" => undefined,
> "server-groups" => undefined
> }
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:write-attribute(name=jvm-options["-Xlog:gc*:file=${jboss.domain.servers.dir}/server-two/log/gc.log"])
> {
> "outcome" => "success",
> "result" => undefined,
> "server-groups" => undefined
> }
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:read-resource
> {
> "outcome" => "success",
> "result" => {
> "agent-lib" => undefined,
> "agent-path" => undefined,
> "debug-enabled" => undefined,
> "debug-options" => undefined,
> "env-classpath-ignored" => undefined,
> "environment-variables" => undefined,
> "heap-size" => undefined,
> "java-agent" => undefined,
> "java-home" => undefined,
> "jvm-options" => undefined,
> "launch-command" => undefined,
> "max-heap-size" => undefined,
> "max-permgen-size" => undefined,
> "permgen-size" => undefined,
> "stack-size" => undefined,
> "type" => undefined
> }
> }
> {code}
> As you can see from the above command does not update the {{jvm-options}}. However if you use the {{add-jvm-option}} operation that does work. It seems the {{write-attribute}} operation should also work.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFCORE-4908) The write-attribute operation does not work on a hosts JVM resource
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFCORE-4908?page=com.atlassian.jira.plug... ]
Brian Stansberry edited comment on WFCORE-4908 at 4/14/20 10:17 PM:
--------------------------------------------------------------------
Thanks, guys. The problem is EnhancedSyntaxSupport.updateWithEnhancedSyntax isn't very careful about seeing whether the 'attributeExpression' it is given has anything to do with the actual model structure. I threw up https://github.com/wildfly/wildfly-core/pull/4158 which fixes it.
was (Author: brian.stansberry):
Thanks, guys. The problem is EnhancedSyntaxSupport.updateWithEnhancedSyntax isn't very careful about seeing whether the 'attributeExpression' it is given has anything to do with the actual model structure. I threw up https://github.com/bstansberry/wildfly-core/commit/2f3eac59ce2423475718c3... which causes this bad op to correctly fail but it breaks some unit tests, which I've no time to look at.
> The write-attribute operation does not work on a hosts JVM resource
> -------------------------------------------------------------------
>
> Key: WFCORE-4908
> URL: https://issues.redhat.com/browse/WFCORE-4908
> Project: WildFly Core
> Issue Type: Bug
> Components: Management
> Reporter: James Perkins
> Assignee: Jeff Mesnil
> Priority: Major
> Labels: domain-mode
>
> Under a hosts server config, {{/host=master/server-config=server-one/}}, there is a {{jvm}} resource. On this resource the {{write-attribute}} operation does not work expected.
> {code}
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:add
> {
> "outcome" => "success",
> "result" => undefined,
> "server-groups" => undefined
> }
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:write-attribute(name=jvm-options["-Xlog:gc*:file=${jboss.domain.servers.dir}/server-two/log/gc.log"])
> {
> "outcome" => "success",
> "result" => undefined,
> "server-groups" => undefined
> }
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:read-resource
> {
> "outcome" => "success",
> "result" => {
> "agent-lib" => undefined,
> "agent-path" => undefined,
> "debug-enabled" => undefined,
> "debug-options" => undefined,
> "env-classpath-ignored" => undefined,
> "environment-variables" => undefined,
> "heap-size" => undefined,
> "java-agent" => undefined,
> "java-home" => undefined,
> "jvm-options" => undefined,
> "launch-command" => undefined,
> "max-heap-size" => undefined,
> "max-permgen-size" => undefined,
> "permgen-size" => undefined,
> "stack-size" => undefined,
> "type" => undefined
> }
> }
> {code}
> As you can see from the above command does not update the {{jvm-options}}. However if you use the {{add-jvm-option}} operation that does work. It seems the {{write-attribute}} operation should also work.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFCORE-4908) The write-attribute operation does not work on a hosts JVM resource
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFCORE-4908?page=com.atlassian.jira.plug... ]
Brian Stansberry commented on WFCORE-4908:
------------------------------------------
Thanks, guys. The problem is EnhancedSyntaxSupport.updateWithEnhancedSyntax isn't very careful about seeing whether the 'attributeExpression' it is given has anything to do with the actual model structure. I threw up https://github.com/bstansberry/wildfly-core/commit/2f3eac59ce2423475718c3... which causes this bad op to correctly fail but it breaks some unit tests, which I've no time to look at.
> The write-attribute operation does not work on a hosts JVM resource
> -------------------------------------------------------------------
>
> Key: WFCORE-4908
> URL: https://issues.redhat.com/browse/WFCORE-4908
> Project: WildFly Core
> Issue Type: Bug
> Components: Management
> Reporter: James Perkins
> Assignee: Jeff Mesnil
> Priority: Major
> Labels: domain-mode
>
> Under a hosts server config, {{/host=master/server-config=server-one/}}, there is a {{jvm}} resource. On this resource the {{write-attribute}} operation does not work expected.
> {code}
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:add
> {
> "outcome" => "success",
> "result" => undefined,
> "server-groups" => undefined
> }
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:write-attribute(name=jvm-options["-Xlog:gc*:file=${jboss.domain.servers.dir}/server-two/log/gc.log"])
> {
> "outcome" => "success",
> "result" => undefined,
> "server-groups" => undefined
> }
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:read-resource
> {
> "outcome" => "success",
> "result" => {
> "agent-lib" => undefined,
> "agent-path" => undefined,
> "debug-enabled" => undefined,
> "debug-options" => undefined,
> "env-classpath-ignored" => undefined,
> "environment-variables" => undefined,
> "heap-size" => undefined,
> "java-agent" => undefined,
> "java-home" => undefined,
> "jvm-options" => undefined,
> "launch-command" => undefined,
> "max-heap-size" => undefined,
> "max-permgen-size" => undefined,
> "permgen-size" => undefined,
> "stack-size" => undefined,
> "type" => undefined
> }
> }
> {code}
> As you can see from the above command does not update the {{jvm-options}}. However if you use the {{add-jvm-option}} operation that does work. It seems the {{write-attribute}} operation should also work.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFCORE-4908) The write-attribute operation does not work on a hosts JVM resource
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFCORE-4908?page=com.atlassian.jira.plug... ]
Brian Stansberry updated WFCORE-4908:
-------------------------------------
Component/s: (was: CLI)
> The write-attribute operation does not work on a hosts JVM resource
> -------------------------------------------------------------------
>
> Key: WFCORE-4908
> URL: https://issues.redhat.com/browse/WFCORE-4908
> Project: WildFly Core
> Issue Type: Bug
> Components: Management
> Reporter: James Perkins
> Assignee: Jeff Mesnil
> Priority: Major
> Labels: domain-mode
>
> Under a hosts server config, {{/host=master/server-config=server-one/}}, there is a {{jvm}} resource. On this resource the {{write-attribute}} operation does not work expected.
> {code}
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:add
> {
> "outcome" => "success",
> "result" => undefined,
> "server-groups" => undefined
> }
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:write-attribute(name=jvm-options["-Xlog:gc*:file=${jboss.domain.servers.dir}/server-two/log/gc.log"])
> {
> "outcome" => "success",
> "result" => undefined,
> "server-groups" => undefined
> }
> [domain@embedded /] /host=master/server-config=server-one/jvm=default:read-resource
> {
> "outcome" => "success",
> "result" => {
> "agent-lib" => undefined,
> "agent-path" => undefined,
> "debug-enabled" => undefined,
> "debug-options" => undefined,
> "env-classpath-ignored" => undefined,
> "environment-variables" => undefined,
> "heap-size" => undefined,
> "java-agent" => undefined,
> "java-home" => undefined,
> "jvm-options" => undefined,
> "launch-command" => undefined,
> "max-heap-size" => undefined,
> "max-permgen-size" => undefined,
> "permgen-size" => undefined,
> "stack-size" => undefined,
> "type" => undefined
> }
> }
> {code}
> As you can see from the above command does not update the {{jvm-options}}. However if you use the {{add-jvm-option}} operation that does work. It seems the {{write-attribute}} operation should also work.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months