You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide an API to explain which templates will affect a provided index name and the reveal the order the templates would apply.
Perhaps also return the resulting final combined template that would be applied to the given index name.
All of the code to do apply this already exists, the Explain functionality would essentially be a dry-run version of the code with additional detailed output.
This would greatly help in troubleshooting and reasoning about templates, especially when there's many templates that might affect an index in complex ways with inheritance.
It should also highlight when templates apply that have the same order value and warn that these will apply non-deterministically and potentially suggest not using the same order value.
This functionality would be immediately useful with the current index templates design that uses inheritance.
For the v2 templates design where a template can use other component templates, the Explain functionality might assist users in migrating from v1 templates to v2 templates with suggestions on what conversions or sections of templates could be changed into v2 component templates with suggested order.
Or the Explain functionality could have a "convert" switch to output an equivalent v2 template scenario perhaps.
@geekpete this is already part of the design for index templates v2 (search for "Simulate index template api" on #53101), so I think this can be closed as a duplicate. If I misunderstood lemme know!
Describe the feature:
Provide an API to explain which templates will affect a provided index name and the reveal the order the templates would apply.
Perhaps also return the resulting final combined template that would be applied to the given index name.
All of the code to do apply this already exists, the Explain functionality would essentially be a dry-run version of the code with additional detailed output.
This would greatly help in troubleshooting and reasoning about templates, especially when there's many templates that might affect an index in complex ways with inheritance.
It should also highlight when templates apply that have the same order value and warn that these will apply non-deterministically and potentially suggest not using the same order value.
This functionality would be immediately useful with the current index templates design that uses inheritance.
For the v2 templates design where a template can use other component templates, the Explain functionality might assist users in migrating from v1 templates to v2 templates with suggestions on what conversions or sections of templates could be changed into v2 component templates with suggested order.
Or the Explain functionality could have a "convert" switch to output an equivalent v2 template scenario perhaps.
V2 Index Templates: #53101
The text was updated successfully, but these errors were encountered: