Skip to content

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 <quentin.pradet@elastic.co>
(cherry picked from commit d7200dc)
github-actions bot pushed a commit that referenced this pull request Nov 12, 2024
Co-authored-by: Quentin Pradet <quentin.pradet@elastic.co>
(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