-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Get-templates APIs don't support lists #78989
Get-templates APIs don't support lists #78989
Conversation
We document that `GET /_index_template/...` accepts a comma-separated list of template names but in fact today this API accepts only a single name or pattern. Likewise `GET /_cat/templates/...` (at least it didn't until elastic#78829 but that's not released yet). This commit fixes the docs to indicate these APIs accept only a single template name and also adds some extra validation to reject requests containing a `,` since such a request cannot match any actual templates. It also adjusts `GET /_cat/templates` to use the filtering built into `TransportGetComposableIndexTemplateAction` rather than retrieving all templates and then filtering them on the coordinating node.
I'm in two minds about whether to call this a breaking change or not. It turns a |
Pinging @elastic/es-data-management (Team:Data Management) |
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.
LGTM, thanks David
version: " - 7.7.99" | ||
reason: "index template v2 API unavailable before 7.8" |
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.
Thanks for catching this
Pinging @elastic/clients-team (Team: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.
LGTM from a clients perspective. This type is already captured as a non-list within the Elasticsearch specification as well.
We document that `GET /_index_template/...` accepts a comma-separated list of template names but in fact today this API accepts only a single name or pattern. Likewise `GET /_cat/templates/...` (at least it didn't until elastic#78829 but that's not released yet). This commit fixes the docs to indicate these APIs accept only a single template name and also adds some extra validation to reject requests containing a `,` since such a request cannot match any actual templates. It also adjusts `GET /_cat/templates` to use the filtering built into `TransportGetComposableIndexTemplateAction` rather than retrieving all templates and then filtering them on the coordinating node. Backport of elastic#78989
We document that `GET /_index_template/...` accepts a comma-separated list of template names but in fact today this API accepts only a single name or pattern. Likewise `GET /_cat/templates/...` (at least it didn't until #78829 but that's not released yet). This commit fixes the docs to indicate these APIs accept only a single template name and also adds some extra validation to reject requests containing a `,` since such a request cannot match any actual templates. It also adjusts `GET /_cat/templates` to use the filtering built into `TransportGetComposableIndexTemplateAction` rather than retrieving all templates and then filtering them on the coordinating node. Backport of #78989
We document that
GET /_index_template/...
accepts a comma-separatedlist of template names but in fact today this API accepts only a single
name or pattern. Likewise
GET /_cat/templates/...
(at least it didn'tuntil #78829 but that's not released yet). This commit fixes the docs to
indicate these APIs accept only a single template name and also adds
some extra validation to reject requests containing a
,
since such arequest cannot match any actual templates.
It also adjusts
GET /_cat/templates
to use the filtering built intoTransportGetComposableIndexTemplateAction
rather than retrieving alltemplates and then filtering them on the coordinating node.