Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…203724) # Backport This will backport the following commits from `main` to `8.17`: - [[Index Management] Fix schema for index templates (#203552)](#203552) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-11T09:06:46Z","message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","v9.0.0","backport:prev-minor","v8.17.0","v8.18.0","v8.17.1"],"title":"[Index Management] Fix schema for index templates","number":203552,"url":"https://github.com/elastic/kibana/pull/203552","mergeCommit":{"message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203552","number":203552,"mergeCommit":{"message":"[Index Management] Fix schema for index templates (#203552)\n\nFixes https://github.com/elastic/kibana/issues/203553\r\n\r\n## Summary\r\n\r\nThis PR fixes the template schema so that the server allows creating a\r\ntemplate with undefined index mode. The issue is that when we exposed\r\nthe index mode info in #197874, we\r\nassumed that, by default, the index mode is `standard` so `indexMode`\r\nwas added as a required field. However, in\r\nhttps://github.com//pull/199521, we added the index mode\r\nfield only if data streams toggle is enabled, so the `indexMode` is\r\n`undefined`.\r\n\r\nThe PR also fixes a smaller issuer where Index mode is displayed even\r\nwhen it is undefined (when data streams are disabled):\r\n**Before:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 19 01 09\"\r\nsrc=\"https://github.com/user-attachments/assets/e22cab14-eade-4591-8da8-f9aec5ad6c43\">\r\n\r\n**Now:**\r\n<img width=\"905\" alt=\"Screenshot 2024-12-10 at 18 19 29\"\r\nsrc=\"https://github.com/user-attachments/assets/e7768cdc-9610-4a25-b403-0320b7137db5\">\r\n\r\n\r\n**How to test:**\r\n1. Go to Index Management -> Index templates and start creating an index\r\ntemplate.\r\n2. Specify the name and the index pattern and disable the \"Data streams\"\r\ntoggle.\r\n3. Go to Review step and verify that index mode is not displayed in the\r\nsummary and that creating the index template is successful.","sha":"bdc80322b08a99c763142b93e07179bed431f4dd"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elena Stoeva <[email protected]>
- Loading branch information