[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)
4 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)
4 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)
4 years, 4 months
[JBoss JIRA] (WFLY-12925) MP FT retry.callsSucceededRetried.total metric has wrong value
by Ivan Straka (Jira)
[ https://issues.redhat.com/browse/WFLY-12925?page=com.atlassian.jira.plugi... ]
Ivan Straka updated WFLY-12925:
-------------------------------
Steps to Reproduce:
build WildFly
clone git@github.com:istraka/eap-microprofile-test-suite.git branch mp-ft-metrics-reproducer
run the Reproducers#fallbackCounter test:
{code:bash}
mvn clean verify -pl tooling-server-configuration,microprofile-health -Djboss.home=_path_to_wf_ -DfailIfNoTests=false -Dtest=Reproducers#retryCallsSucceededCounter
{code}
> MP FT retry.callsSucceededRetried.total metric has wrong value
> --------------------------------------------------------------
>
> Key: WFLY-12925
> URL: https://issues.redhat.com/browse/WFLY-12925
> Project: WildFly
> Issue Type: Bug
> Components: MP Fault Tolerance
> Affects Versions: 19.0.0.Beta1
> Reporter: Ivan Straka
> Assignee: Radoslav Husar
> Priority: Blocker
>
> When method annotated with @Fallback and @Retry fails, MP FT retry.callsSucceededRetried.total metric even though the method fails everytime and falls into a fallback method.
> The issue is only in the metric. The method is retried as expected and fallback method is invoked only once as expected.
> *Reproducer:*
> https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> *CDI Bean:*
> {code:java}
> @Fallback(fallbackMethod = "isReadyFallback")
> @Retry(maxRetries = MAX_RETRIES)
> public boolean isReady() throws IOException {
> service.simulateOpeningResources();
> return ready.get();
> }
> public boolean isReadyFallback() {
> return readyInMainenance.get();
> }
> @Counted(name = "simulation-count", absolute = true, displayName = "Simulation Count", description = "Number of simulateOpeningResources invocations", reusable = true)
> public void simulateOpeningResources() throws IOException {
> if (inMaintanance.get()) {
> throw new IOException("In maintanance");
> }
> }
> {code}
> https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> *Smallrye issue*
> https://github.com/smallrye/smallrye-fault-tolerance/issues/159
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months
[JBoss JIRA] (WFLY-12925) MP FT retry.callsSucceededRetried.total metric has wrong value
by Ivan Straka (Jira)
[ https://issues.redhat.com/browse/WFLY-12925?page=com.atlassian.jira.plugi... ]
Ivan Straka updated WFLY-12925:
-------------------------------
Steps to Reproduce:
build WildFly
clone git@github.com:istraka/eap-microprofile-test-suite.git branch mp-ft-metrics-reproducer
run the Reproducers#retryCallsSucceededCounter test:
{code:bash}
mvn clean verify -pl tooling-server-configuration,microprofile-health -Djboss.home=_path_to_wf_ -DfailIfNoTests=false -Dtest=Reproducers#retryCallsSucceededCounter
{code}
was:
build WildFly
clone git@github.com:istraka/eap-microprofile-test-suite.git branch mp-ft-metrics-reproducer
run the Reproducers#fallbackCounter test:
{code:bash}
mvn clean verify -pl tooling-server-configuration,microprofile-health -Djboss.home=_path_to_wf_ -DfailIfNoTests=false -Dtest=Reproducers#retryCallsSucceededCounter
{code}
> MP FT retry.callsSucceededRetried.total metric has wrong value
> --------------------------------------------------------------
>
> Key: WFLY-12925
> URL: https://issues.redhat.com/browse/WFLY-12925
> Project: WildFly
> Issue Type: Bug
> Components: MP Fault Tolerance
> Affects Versions: 19.0.0.Beta1
> Reporter: Ivan Straka
> Assignee: Radoslav Husar
> Priority: Blocker
>
> When method annotated with @Fallback and @Retry fails, MP FT retry.callsSucceededRetried.total metric even though the method fails everytime and falls into a fallback method.
> The issue is only in the metric. The method is retried as expected and fallback method is invoked only once as expected.
> *Reproducer:*
> https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> *CDI Bean:*
> {code:java}
> @Fallback(fallbackMethod = "isReadyFallback")
> @Retry(maxRetries = MAX_RETRIES)
> public boolean isReady() throws IOException {
> service.simulateOpeningResources();
> return ready.get();
> }
> public boolean isReadyFallback() {
> return readyInMainenance.get();
> }
> @Counted(name = "simulation-count", absolute = true, displayName = "Simulation Count", description = "Number of simulateOpeningResources invocations", reusable = true)
> public void simulateOpeningResources() throws IOException {
> if (inMaintanance.get()) {
> throw new IOException("In maintanance");
> }
> }
> {code}
> https://github.com/istraka/eap-microprofile-test-suite/blob/mp-ft-metrics...
> *Smallrye issue*
> https://github.com/smallrye/smallrye-fault-tolerance/issues/159
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 5 months