-
Notifications
You must be signed in to change notification settings - Fork 101
Fix search_shards API #2834
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
Fix search_shards API #2834
Conversation
specification/_types/Node.ts
Outdated
// version, min_index_version and max_index_version are set when using the search_shards API | ||
version?: VersionString | ||
min_index_version?: integer | ||
max_index_version?: integer |
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 hesitated a lot on this one. NodeAttributes is used by transform.get_transform_stats, cat.ml_data_frame_analytics, and cat.nodeattrs, but they're much ligther versions, which is why many fields are optional. At this point I think it would be better to have a specific NodeAttributes
just for search_shards
, which would remove a lot of optional keys. But I'm not sure about the impact on typed 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.
Both solutions should be fine. It might as well be worth to consider which solution better reflects the server code.
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.
It's definitely the second one. I'll update my pull request then, thanks.
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.
Done in 08babed
(#2834). Our tooling forced me to use a different class name.
I hope this won't be breaking any clients.
Following you can find the validation results for the API you have changed.
You can validate this API yourself by using the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.15 8.15
# Navigate to the new working tree
cd .worktrees/backport-8.15
# Create a new branch
git switch --create backport-2834-to-8.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 72b6781a56ff0ffc93c5949c6327e550180ce721
# Push it to GitHub
git push --set-upstream origin backport-2834-to-8.15
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.15 Then, create a pull request where the |
* Fix search_shards API * Use a specialized version of NodeAttributes for search_shards (cherry picked from commit 72b6781)
No description provided.