Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Zone Decommission] GET response has redundant field #4750

Closed
imRishN opened this issue Oct 12, 2022 · 2 comments
Closed

[BUG] [Zone Decommission] GET response has redundant field #4750

imRishN opened this issue Oct 12, 2022 · 2 comments
Labels
bug Something isn't working distributed framework

Comments

@imRishN
Copy link
Member

imRishN commented Oct 12, 2022

Describe the bug
The current GET API call to get the decommission state is -
curl -X GET "localhost:9202/_cluster/decommission/awareness/_status?pretty"

{
	"awareness" : {
		"zone" : "zone-1"
	},
	"status" : "SUCCESSFUL"
}

Here, since awareness is already mentioned in GET path, the awareness field in GET response looks redundant.

To Reproduce
Steps to reproduce the behavior:

  1. Decommission an attribute - curl -X PUT "localhost:9201/_cluster/decommission/awareness/zone/zone-2?pretty"
  2. Get Decommission status - curl -X GET "localhost:9201/_cluster/decommission/awareness/_status?pretty"

Expected behavior
We can simplify the response to just have attribute name and status as field. Something like -

> curl -X GET "localhost:9202/_cluster/decommission/awareness/_status?pretty"
{
  "zone" : "zone-1",
  "status" : "SUCCESSFUL"
}
@imRishN
Copy link
Member Author

imRishN commented Oct 12, 2022

Created PR to fix the same - #4751

@imRishN
Copy link
Member Author

imRishN commented Oct 18, 2022

Closing issue, PR merged now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working distributed framework
Projects
None yet
Development

No branches or pull requests

3 participants