Remove the 'template' field in index templates.#49460
Remove the 'template' field in index templates.#49460jtibshirani merged 4 commits intoelastic:masterfrom
Conversation
The `template` field was deprecated in 6.0 in favor of `index_patterns`, and can now be removed.
|
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
| patterns(Collections.singletonList((String) entry.getValue())); | ||
| } | ||
| } else if (name.equals("index_patterns")) { | ||
| if (name.equals("index_patterns")) { |
There was a problem hiding this comment.
This is a hard break -- users who specified template in the source would not have seen a deprecation warning about it, since we convert it to index_patterns before sending the REST request to the server. I wasn't sure how to address this, any guidance here would be great.
There was a problem hiding this comment.
We can and should add a check to the Deprecation Info API, but that still leaves folks using the OSS distribution lacking a notification.
This comment was based on a misunderstanding, please disregard.
There was a problem hiding this comment.
To help clarify my original comment, I am wondering how to warn users of the Java HLRC that they can no longer specify template when using PutIndexTemplateRequest#source. Before this PR we would silently convert it to index_patterns before sending it off to the server.
There was a problem hiding this comment.
Could we change the 7.x branch to add a deprecation warning if template was used and remove it in 8.0? That seems reasonable to me (if possible with the HLRC)
There was a problem hiding this comment.
@dakrone this is a nice idea, I'll open a follow-up PR against 7.x to emit a deprecation warning if template is used.
dakrone
left a comment
There was a problem hiding this comment.
LGTM, I left a comment about the HLRC question.
| patterns(Collections.singletonList((String) entry.getValue())); | ||
| } | ||
| } else if (name.equals("index_patterns")) { | ||
| if (name.equals("index_patterns")) { |
There was a problem hiding this comment.
Could we change the 7.x branch to add a deprecation warning if template was used and remove it in 8.0? That seems reasonable to me (if possible with the HLRC)
|
@elasticmachine update branch |
|
@elasticmachine run elasticsearch-ci/default-distro |
…50831) Since 6.0, the 'template' field has been deprecated in put template requests in favour of index_patterns. Previously, the PutIndexTemplateRequest would accept the 'template' field in its 'source' methods and silently convert it to 'index_patterns'. This meant that users specifying 'template' in the source would not receive a deprecation warning from the server. This PR makes a small change to no longer silently convert 'template' to 'index_patterns', which ensures that users receive a deprecation warning. Follow-up to #49460.
The `template` field was deprecated in 6.0 in favor of `index_patterns`, and can now be removed. Relates to elastic#21009.
The
templatefield was deprecated in 6.0 in favor ofindex_patterns, and cannow be removed.
Relates to #21009.