Emit a deprecation warning when a typed index template is triggered. #37741
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an experiment/ work in progress and is not ready for review.
This PR adds a deprecation warning each time an index template is triggered that has a custom mapping type. If the template metadata has no mappings, or a single type with name
_doc
, then we do not emit a warning.For context, even if an index template's mapping was created without a type, we are continuing to store the template with the dummy type name
_doc
. This makes the code easier to reason about, because in 7.x we need to be able to support typed templates as well, and potentially communicate with 6.x nodes. In 8.x, once we know there are no more custom types, we can likely migrate all stored templates to be typeless.Note that there is a separate PR to deprecate types in put + get index template requests (#37484).