-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Do not allow breaking v2 index templates by removing in-use component templates #56314
Comments
Pinging @elastic/es-core-features (:Core/Features/Indices APIs) |
Should we also disallow creating/updating an index template with a component template that doesn't exist? This currently returns a 200:
Even though this index template isn't "broken", I think it's logical for this request to fail the same way the originally described request would fail, since they both end up in the same state: an index template referring to a nonexistent component template. |
I think we should, at least to avoid the case where someone typos a component template name and has an unintended consequence. |
I think it is broken.
I agree, the goal is that v2 index templates should be unbreakable. |
This commit removes the ability to put V2 index templates that refence missing component templates. It also prevents removing component templates that are being referenced by an existing V2 index template. Relates to elastic#53101 Resolves elastic#56314
This commit removes the ability to put V2 index templates that reference missing component templates. It also prevents removing component templates that are being referenced by an existing V2 index template. Relates to elastic#53101 Resolves elastic#56314
A major design goal of v2 index templates is to allow us to perform more thorough validation at template creation time. Such templates are composed of explicit component templates, so we can validate the resulting template. However, removing a component template that is used by a v2 index template would break any v2 index templates using that component template, thus ruining our plan for more thorough validation of v2 index templates. We should prevent the breakage by not allowing removing component templates that are in use by any v2 index template.
The text was updated successfully, but these errors were encountered: