-
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
Changes from 3 commits
69c9eee
1de905b
30176b8
42a64bc
85a3def
ce2a8a1
62d1739
0a98b37
9ea3abf
0dcd6ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
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.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ import { Duration } from '@_types/Time' | |
| import { Alias } from '@indices/_types/Alias' | ||
| import { DataStreamVisibility } from '@indices/_types/DataStream' | ||
| import { DataStreamLifecycle } from '@indices/_types/DataStreamLifecycle' | ||
| import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' | ||
| import { IndexSettings } from '@indices/_types/IndexSettings' | ||
| import { Dictionary } from '@spec_utils/Dictionary' | ||
|
|
||
|
|
@@ -178,4 +179,9 @@ export class IndexTemplateMapping { | |
| * @availability serverless stability=stable | ||
| */ | ||
| lifecycle?: DataStreamLifecycle | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, this
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy to do this as a follow-up, as long as this is before 9.3, to avoid breaking those APIs twice. |
||
| /** | ||
| * @availability stack since=8.19.0 stability=stable | ||
pquentin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * @availability serverless stability=stable | ||
| */ | ||
| data_stream_options?: DataStreamOptionsTemplate | ||
nielsbauman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
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.
This import isn't particularly pretty. I'll leave it up to you whether this is fine or if we should extract the
IndexTemplateMappingclass to a dedicated file. If we're extracting it (which I'm in favor of), we should probably also rename it.Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, we should move to a shared place. Options include:
specification/indices/_typesspecification/cluster/_typesspecification/_typesNot sure which is best. Probably
clustersince it's whereTemplatelives in the Elasticsearch code. Unfortunately, moving a class is a breaking change, so that will be 9.3 only.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.
Yep, moving it to
specification/cluster/_typesworks for me 👍. I'm having trouble coming up with a good name though...IndexTemplateis already used for retrieving templates. Is there some kind of naming convention for types that are used for PUT requests?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.
No naming convention, I'm not sure what to use. Is keeping
IndexTemplateMappingthat bad? It will reduce breakage for clients that don't care about the namespace of types.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 mean, I don't think the name itself really makes any sense, but if it avoids breakage, I'm fine with leaving it as is. Then let's just stick to moving the class. Could you take care of that perhaps? 🙏
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.
Sure! So I did it locally, which made me realize that we already have a case of an endpoint doing this:
https://github.com/elastic/elasticsearch-specification/blob/6566f6962beceaa27c50ac31100ac22f62aea822/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts#L25C10-L25C30
So let's merge without doing this for now, and I'll ask to @l-trotta what's the best thing to do here, as the location of types mostly affects the Java client.