Skip to content
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

[8.17] [Index Management] Fix schema for index templates (#203552) #203724

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.17:

Questions ?

Please refer to the Backport tool documentation

Fixes elastic#203553

## Summary

This PR fixes the template schema so that the server allows creating a
template with undefined index mode. The issue is that when we exposed
the index mode info in elastic#197874, we
assumed that, by default, the index mode is `standard` so `indexMode`
was added as a required field. However, in
elastic#199521, we added the index mode
field only if data streams toggle is enabled, so the `indexMode` is
`undefined`.

The PR also fixes a smaller issuer where Index mode is displayed even
when it is undefined (when data streams are disabled):
**Before:**
<img width="905" alt="Screenshot 2024-12-10 at 19 01 09"
src="https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43">

**Now:**
<img width="905" alt="Screenshot 2024-12-10 at 18 19 29"
src="https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5">

**How to test:**
1. Go to Index Management -> Index templates and start creating an index
template.
2. Specify the name and the index pattern and disable the "Data streams"
toggle.
3. Go to Review step and verify that index mode is not displayed in the
summary and that creating the index template is successful.

(cherry picked from commit bdc8032)
@kibanamachine kibanamachine merged commit 9ff0325 into elastic:8.17 Dec 11, 2024
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 697.7KB 697.8KB +72.0B

cc @ElenaStoeva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants