-
Notifications
You must be signed in to change notification settings - Fork 115
Fix cluster.put_component_template API #5370
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 don't think this is the right place to add this field. I see the class
IndexStateis indeed used for thetemplatefield of component templates here:elasticsearch-specification/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts
Lines 87 to 90 in 8bb614b
But it's also used in the
GET {index}API response:elasticsearch-specification/specification/indices/get/IndicesGetResponse.ts
Line 26 in 8bb614b
I'd say that the name
IndexStatematches most with the second use case, and that maybe at the time its fields happened to match thetemplatefield of thePUT _component_templateAPI, but they don't match anymore; thedata_streamfield is not valid in thetemplatefield for component templates (or any kind of templates for that matter, it's only valid in the root body of index templates, see here).I see that 00be10a did try to add the
data_stream_optionsfield in some places, but it doesn't look 100% correct to me. Let me have a look and try to correct some things.