Skip to content

Set parameter nodes instead of node_id on task.list #3113

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

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

margaretpearce
Copy link
Contributor

@margaretpearce margaretpearce commented Nov 11, 2024

Closes #3112, closes #3114

Use parameter nodes instead of node_id on task.list.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This is a great catch. Unfortunately none of the Elasticsearch YAML tests that we use for validation set nodes, which is why we missed it. However it was part of validation errors:

"tasks.list": {
"request": [
"Request: query parameter 'node_id' does not exist in the json spec",
"Request: query parameter 'master_timeout' does not exist in the json spec",
"Request: missing json spec query parameter 'nodes'"
],

In addition to your fix, I also switched the type from string[] to NodeIds (which is string | string[]):

  1. typed clients could have a specific type for this
  2. this allows for a comma-separated string too, which is the format Elasticsearch accepts (lists in query parameters are comma-separated by clients before sending)

@pquentin pquentin merged commit d7200dc into elastic:main Nov 12, 2024
12 of 13 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 12, 2024
Co-authored-by: Quentin Pradet <[email protected]>
(cherry picked from commit d7200dc)
github-actions bot pushed a commit that referenced this pull request Nov 12, 2024
Co-authored-by: Quentin Pradet <[email protected]>
(cherry picked from commit d7200dc)
@pquentin
Copy link
Member

pquentin commented Nov 13, 2024

Thank you for your contribution, your change is now available in elasticsearch-py 8.16.0 (and all the other clients that use the specification). Note that elasticsearch-py 8.16.0 added warnings for tech preview/beta APIs and the Task management API is part of those. The release notes explain how to disable the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

elasticsearch.BadRequestError: unrecognized parameter node_id on tasks.list
2 participants