You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "GrantPSpencer (via GitHub)" <gi...@apache.org> on 2023/07/19 22:57:39 UTC
[GitHub] [helix] GrantPSpencer opened a new issue, #2565: Maintenance reason key formatting varies between helix-rest and helix-ui
GrantPSpencer opened a new issue, #2565:
URL: https://github.com/apache/helix/issues/2565
### Describe the bug
If you enable maintenance mode using a curl command against helix-rest and pass in maintenance reason in this way:
-d "maint mode set with curl command"
The reason key will be stored in the znode in UPPERCASE formatting:
{ "REASON" : "maint mode set with curl", ... }
However, if you enable maintenance mode using helix-ui, the reason key will be stored in the znode in lowercase formatting:
{ "reason" : "maintenance mode set through UI", ... }
### To Reproduce
Create maintenance node in helix-rest and in helix-ui and observe the difference in the maintenance znode's reason key
### Expected behavior
They should have identical formatting, my opinion is that UPPERCASE formatting is intended.
### Additional context
https://github.com/apache/helix/blob/4e67fdb9bbfe3124287026563e87c08f5c7c7182/helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/ClusterAccessor.java#L316C23-L316C23
^function that handles this request
I believe this discrepancy occurs because when you use enable it via a curl command, the data is treated as a string and the key's text is set to UPPPERCASE.
When using helix-ui, I believe helix-rest receives it as a JSON Object of {"reason": "maintenance mode set through UI"} and and then passes it to a later function as a customsFieldMap rather than as a string. The customsFieldMap is then iterated over and the lower case "reason" key is used when setting the maintenance znode's fields
https://github.com/apache/helix/blob/4e67fdb9bbfe3124287026563e87c08f5c7c7182/helix-front/src/app/cluster/shared/cluster.service.ts#L44
^ Here is the typescript code that makes the rest request
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
[GitHub] [helix] xyuanlu closed issue #2565: Maintenance reason key formatting varies between helix-rest and helix-ui
Posted by "xyuanlu (via GitHub)" <gi...@apache.org>.
xyuanlu closed issue #2565: Maintenance reason key formatting varies between helix-rest and helix-ui
URL: https://github.com/apache/helix/issues/2565
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org