[JBoss JIRA] (WFWIP-306) Health check response contains default readiness data
by Jeff Mesnil (Jira)
[ https://issues.redhat.com/browse/WFWIP-306?page=com.atlassian.jira.plugin... ]
Jeff Mesnil commented on WFWIP-306:
-----------------------------------
This change is mentioned in the document: https://github.com/wildfly/wildfly-proposals/blob/dc28a32e484667452e5766f...
It was added to fix WFLY-12952 that was done in 19.0.0.Beta2. It is *not* related to the MP Health 2.2 upgrade.
As documented in the WildFly documentation, you can set mp.health.disable-default-procedures to true to keep the previous behaviour
> Health check response contains default readiness data
> -----------------------------------------------------
>
> Key: WFWIP-306
> URL: https://issues.redhat.com/browse/WFWIP-306
> Project: WildFly WIP
> Issue Type: Bug
> Components: MP Health
> Reporter: Fabio Burzigotti
> Assignee: Jeff Mesnil
> Priority: Critical
>
> Starting from Wildfly 19 Beta 2 and with current feature branch for MP Health upgrade to 2.2 [1], some tests started to fail, reporting unexpected content in JSON response.
> When no _readiness_ health check procedures are defined for a given deployment - the returned JSON payload contains a "default" health check readiness object, conventionally named as "ready-deployment." + <archive-name>
> The same _does not_ happen when there's just one registered readiness procedure - i.e. when no annotated _liveness_ procedures exist.
> This change is not documented in the Analysis document: https://github.com/wildfly/wildfly-proposals/pull/284
> The following example uses an Arquillian deployment with a single HealthCheck implementation with _liveness_ health check procedure.
> 1. feature branch [1]
> {code}
> //health
> {
> "status": "UP",
> "checks": [
> {
> "name": "live",
> "status": "UP",
> "data": {
> "key": "value"
> }
> },
> {
> "name": "ready-deployment.HealthTest.war",
> "status": "UP"
> }
> ]
> }
> //live
> {
> "status": "UP",
> "checks": [
> {
> "name": "live",
> "status": "UP",
> "data": {
> "key": "value"
> }
> }
> ]
> }
> //ready
> {
> "status": "UP",
> "checks": [
> {
> "name": "ready-deployment.HealthTest.war",
> "status": "UP"
> }
> ]
> }
> {code}
> 2. here are the results for the same calls against Wildfly 19 Beta 1:
> {code}
> //health
> {
> "status": "UP",
> "checks": [
> {
> "name": "live",
> "status": "UP",
> "data": {
> "key": "value"
> }
> }
> ]
> }
> //live
> {
> "status": "UP",
> "checks": [
> {
> "name": "live",
> "status": "UP",
> "data": {
> "key": "value"
> }
> }
> ]
> }
> //ready
> {
> "status": "UP",
> "checks": []
> }
> {code}
> [1]
> https://github.com/jmesnil/wildfly
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 2 months
[JBoss JIRA] (WFLY-12947) EL should coerce String to Integer in equals operation
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFLY-12947?page=com.atlassian.jira.plugi... ]
Brian Stansberry updated WFLY-12947:
------------------------------------
Fix Version/s: 19.0.0.Beta3
20.0.0.Beta1
> EL should coerce String to Integer in equals operation
> ------------------------------------------------------
>
> Key: WFLY-12947
> URL: https://issues.redhat.com/browse/WFLY-12947
> Project: WildFly
> Issue Type: Bug
> Components: EE
> Affects Versions: 18.0.1.Final
> Reporter: Ricardo Martin Camarero
> Assignee: Ricardo Martin Camarero
> Priority: Major
> Fix For: 19.0.0.Beta3, 20.0.0.Beta1
>
>
> EAP 7's EL equals operations work differently from EAP 6 one.
> For example: put the following JSP in your web application (e.g. example.war)
> {code:java|title=test.jsp}
> <% request.setAttribute("testAttr", "01"); %>
> ${testAttr == 1}</br>
> ${param['foo'] == 1}<br>
> ${1 == param['foo']}<br>
> ${1 == (0+param['foo'])}<br>
> {code}
> Then, access the above JSP with curl command:
> {code}
> $ curl http://localhost:8080/example/test.jsp?foo=01
> {code}
> - Expected result (EAP 6's behavior):
> {code}
> true<br>
> true<br>
> true<br>
> true<br>
> {code}
> - Actual result (EAP 7's behavior):
> {code}
> false<br>
> false<br>
> false<br>
> true<br>
> {code}
> In the section 1.9.2 of [EL 3.0 Specification|https://download.oracle.com/otndocs/jcp/el-3_0-fr-eval-spec...], the ==,!= operators have the following step:
> {code}
> ■If A==B, apply operator
> ■ If A is null or B is null return false for == or eq, true for != or ne.
> ■ If A or B is BigDecimal, coerce both A and B to BigDecimal and then:
> ■ If operator is == or eq, return A.equals(B)
> ■ If operator is != or ne, return !A.equals(B)
> ■ If A or B is Float or Double coerce both A and B to Double, apply operator
> ■ If A or B is BigInteger, coerce both A and B to BigInteger and then:
> ■ If operator is == or eq, return A.equals(B)
> ■ If operator is != or ne, return !A.equals(B)
> ■ If A or B is Byte, Short, Character, Integer, or Long coerce both A and B to Long, apply operator
> ■ If A or B is Boolean coerce both A and B to Boolean, apply operator
> ■ If A or B is an enum, coerce both A and B to enum, apply operator
> ■ If A or B is String coerce both A and B to String, compare lexically
> ■ Otherwise if an error occurs while calling A.equals(B), error
> ■ Otherwise, apply operator to result of A.equals(B)
> {code}
> Note that the step "If A or B is Byte, Short, Character, Integer, or Long coerce both A and B to Long, apply operator" should happen earlier than the step coercion to String. So, it appears that EAP 7's behavior violates the spec.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 2 months