[JBoss JIRA] (DROOLS-4898) Accumulates: min does not work after retracting fact.
by Hiroko Miura (Jira)
[ https://issues.redhat.com/browse/DROOLS-4898?page=com.atlassian.jira.plug... ]
Hiroko Miura commented on DROOLS-4898:
--------------------------------------
[~mfusco] Thank you for your clarification. I thought that retracting object of same type is enough to re-evaluation of existing facts as property 'longVal' in this reproducer (which is compared in accumulate function) is not changed.
> Accumulates: min does not work after retracting fact.
> -----------------------------------------------------
>
> Key: DROOLS-4898
> URL: https://issues.redhat.com/browse/DROOLS-4898
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.26.0.Final, 7.31.0.Final
> Reporter: Hiroko Miura
> Assignee: Mario Fusco
> Priority: Major
> Labels: support
>
> The following rules does not work with specific facts.
> {noformat}
> rule "rule1_long"
> when
> accumulate( Fact( $longVal: longVal), $minVal : min($longVal))
> accumulate( Fact( $longVal2: longVal, $longVal2 > $minVal), $minVal2 : min($longVal2))
> $minFact: Fact( longVal == $minVal)
> $minFact2: Fact( longVal == $minVal2)
> then
> System.out.println("Rule ["+kcontext.getRule().getName()+ "] fires!");
> Long $diff = (Long)$minVal2 - (Long)$minVal;
> $minFact2.setDiff($diff);
> // update($minFact2);
> String errmsg = $diff == 0? " !!!!! ERROR !!!!!" : "";
> System.out.println( drools.getRule().getName() + " diff:" + $minFact2.getLongVal() + " - " + $minFact.getLongVal() + " = " + $diff + errmsg);
> System.out.println("\tretract <= "+$minFact );
> retract($minFact);
> end
> {noformat}
> There seems to be 2 kind of issues (root cause might be same though).
> - 2nd accumulate return same min value with 1st one.
> - rule fire count is less than expected.
> This does not work with specific set of facts, but works with another set of facts.
> If update is called for the fact like above commented out line, this does not happen.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (WFWIP-292) Validate generated OpenAPI document
by Fabio Burzigotti (Jira)
Fabio Burzigotti created WFWIP-292:
--------------------------------------
Summary: Validate generated OpenAPI document
Key: WFWIP-292
URL: https://issues.redhat.com/browse/WFWIP-292
Project: WildFly WIP
Issue Type: Enhancement
Components: MP OpenAPI
Reporter: Fabio Burzigotti
Assignee: Paul Ferraro
Currently no validation is provided for generated document and actually the spec is not requesting for vendors to do that [1] but it would definitely be a key improvement for customers and users in general to know that the generated document is checked and appropriate action is taken (e.g.: log WARN messages etc.).
Online Swagger Editor [2] was used to verify that non valid content was generated.
Also it should be evaluated whether to mention this behavior in community or product docs.
[1]
https://download.eclipse.org/microprofile/microprofile-open-api-1.1.2/mic...
[2]
https://editor.swagger.io/
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (WFWIP-292) Validate generated OpenAPI document
by Fabio Burzigotti (Jira)
[ https://issues.redhat.com/browse/WFWIP-292?page=com.atlassian.jira.plugin... ]
Fabio Burzigotti updated WFWIP-292:
-----------------------------------
Description:
Currently no validation is provided for generated document and actually the spec is not requesting for vendors to do that [1] but it would definitely be a key improvement for customers and users in general to know that the generated document is checked and appropriate action is taken in case content is not valid (e.g.: log WARN messages etc.).
Online Swagger Editor [2] was used to verify that non valid content was generated.
Also it should be evaluated whether to mention this behavior in community or product docs.
[1]
https://download.eclipse.org/microprofile/microprofile-open-api-1.1.2/mic...
[2]
https://editor.swagger.io/
was:
Currently no validation is provided for generated document and actually the spec is not requesting for vendors to do that [1] but it would definitely be a key improvement for customers and users in general to know that the generated document is checked and appropriate action is taken (e.g.: log WARN messages etc.).
Online Swagger Editor [2] was used to verify that non valid content was generated.
Also it should be evaluated whether to mention this behavior in community or product docs.
[1]
https://download.eclipse.org/microprofile/microprofile-open-api-1.1.2/mic...
[2]
https://editor.swagger.io/
> Validate generated OpenAPI document
> -------------------------------------
>
> Key: WFWIP-292
> URL: https://issues.redhat.com/browse/WFWIP-292
> Project: WildFly WIP
> Issue Type: Enhancement
> Components: MP OpenAPI
> Reporter: Fabio Burzigotti
> Assignee: Paul Ferraro
> Priority: Major
>
> Currently no validation is provided for generated document and actually the spec is not requesting for vendors to do that [1] but it would definitely be a key improvement for customers and users in general to know that the generated document is checked and appropriate action is taken in case content is not valid (e.g.: log WARN messages etc.).
> Online Swagger Editor [2] was used to verify that non valid content was generated.
> Also it should be evaluated whether to mention this behavior in community or product docs.
> [1]
> https://download.eclipse.org/microprofile/microprofile-open-api-1.1.2/mic...
> [2]
> https://editor.swagger.io/
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months
[JBoss JIRA] (WFWIP-291) Log messages from io.smallrye.openapi don't have message ID
by Fabio Burzigotti (Jira)
Fabio Burzigotti created WFWIP-291:
--------------------------------------
Summary: Log messages from io.smallrye.openapi don't have message ID
Key: WFWIP-291
URL: https://issues.redhat.com/browse/WFWIP-291
Project: WildFly WIP
Issue Type: Bug
Components: MP OpenAPI
Reporter: Fabio Burzigotti
Assignee: Paul Ferraro
Messages logged by io.smallrye.openapi don't have assigned ID:
{code}
2020-01-05 16:58:49,225 DEBUG [io.smallrye.openapi.runtime.util.SchemaFactory] (MSC service thread 1-4) Processing a single @Schema annotation.
2020-01-05 16:58:49,225 DEBUG [io.smallrye.openapi.runtime.scanner.OpenApiAnnotationScanner] (MSC service thread 1-4) Processing a single @Response annotation.
2020-01-05 16:58:49,225 DEBUG [io.smallrye.openapi.runtime.scanner.OpenApiAnnotationScanner] (MSC service thread 1-4) Processing jax-rs method: {0}
2020-01-05 16:58:49,225 DEBUG [io.smallrye.openapi.runtime.scanner.OpenApiDataObjectScanner] (MSC service thread 1-4) Starting processing with root: java.lang.String
{code}
A search in SmallRye implementation seems to show that IDs are not used even when level is WARN:
{code}
$ find . -name '*.*' -type f -print0 | xargs -0 grep --color -n -e 'LOG.warn'
./implementation/src/main/java/io/smallrye/openapi/runtime/scanner/ParameterProcessor.java:551: LOG.warnf("Matrix parameter references missing path segment: %s", segmentName);
./implementation/src/main/java/io/smallrye/openapi/runtime/scanner/ParameterProcessor.java:1147: LOG.warnf("Value '%s' is not a valid %s default", stringValue, primitive.name().toLowerCase());
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 4 months