-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Resurrect _cluster/voting_config_exclusions/{node_name} #75951
Merged
joegallo
merged 6 commits into
elastic:master
from
joegallo:resurrect-cluster-voting-config-exclusions
Aug 10, 2021
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
72e4b07
Resurrect _cluster/voting_config_exclusions/{node_name}
joegallo 58eef10
Add specs for yamlRestCompatTest
joegallo e6f5d71
Clearly this doesn't actually work as advertised
joegallo 78f3575
Check warnings in the catch, too
joegallo 4f7c96b
Revert "Clearly this doesn't actually work as advertised"
joegallo cc6f169
Revert "Check warnings in the catch, too"
joegallo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...esources/rest-api-spec/api/cluster.post_voting_config_exclusions_with_node_name_part.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"cluster.post_voting_config_exclusions_with_node_name_part":{ | ||
"documentation":{ | ||
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html", | ||
"description":"Updates the cluster voting config exclusions by node_name (not node ids or node names)." | ||
}, | ||
"stability":"stable", | ||
"visibility":"public", | ||
"headers":{ | ||
"accept": [ "application/vnd.elasticsearch+json;compatible-with=7"] | ||
}, | ||
"url":{ | ||
"paths":[ | ||
{ | ||
"path":"/_cluster/voting_config_exclusions/{node_name}", | ||
"methods":[ | ||
"POST" | ||
], | ||
"parts":{ | ||
"node_name":{ | ||
"type":"string", | ||
"description":"A comma-separated list of node descriptors of the nodes to exclude from the voting configuration." | ||
} | ||
}, | ||
"deprecated":{ | ||
"version":"7.8.0", | ||
"description":"node_name is deprecated, use node_names or node_ids instead" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...esources/rest-api-spec/test/v7compat/cluster.voting_config_exclusions/10_basic_compat.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
setup: | ||
- skip: | ||
version: "9.0.0 - " | ||
reason: "compatible from 8.x to 7.x" | ||
features: | ||
- "headers" | ||
- "warnings_regex" | ||
|
||
--- | ||
"Throw exception when adding voting config exclusion by specifying a 'node_name'": | ||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
cluster.post_voting_config_exclusions_with_node_name_part: | ||
node_name: someNodeName | ||
warnings_regex: | ||
- ".* /_cluster/voting_config_exclusions/\\{node_name\\} has been removed. .*" | ||
catch: /\[node_name\] has been removed, you must set \[node_names\] or \[node_ids\]/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this route will always produce an error even in compatibility mode, should we not create an API specification for it? I'm not sure we want this API to be in generated clients
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's under
rest-api-spec/src/yamlRestCompatTest/resources/rest-api-spec/api/
, I think we're already good on that, right? That is, this is just intended to be a spec definition for the purposes of the yml tests themselves, it's not supposed to leak up and out.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't know the rules for which files are picked up by the artifacts API and which aren't. If this file doesn't make it's way into the built artifact for
rest-api-spec
then this is fine.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty confident that this will not get picked up to be visible by clients, if it does we can quickly fix it (or revert this PR).