Commit 3348eaa
# Backport
This will backport the following commits from `main` to `8.19`:
- [[Data Streams] Fix displayed index mode
(#215683)](#215683)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-04-16T13:09:33Z","message":"[Data
Streams] Fix displayed index mode (#215683)\n\nFixes
https://github.com/elastic/kibana/issues/208671\n\n## Summary\n\nBefore
this PR, the displayed index mode of the data streams was\ndetermined
based on the index mode of the associated index template.\nHowever, the
index mode can also be set through the component template,\nso that
logic is not reliable and can cause incorrectly displayed index\nmode
like described in https://github.com/elastic/kibana/issues/208671.\n\nIn
this PR, we replace this logic with the recently added
`index_mode`\nfield to the Es Get Data Streams API
(see\nhttps://github.com/elastic/elasticsearch/pull/122486).\n\n**How to
test:**\n1. Create a component template with a LogsDB index mode (you
can also\ntest with other index modes):\n```\nPUT
_component_template/my-component-template\n{\n \"template\": {\n
\"settings\": {\n \"index\": {\n \"mode\": \"logsdb\"\n }\n }\n
}\n}\n```\n2. Create an index template that is composed of the component
template\nabove:\n```\nPUT _index_template/my-index-template\n{\n
\"index_patterns\": [\n \"my-ds-*\"\n ],\n \"data_stream\": {},\n
\"composed_of\": [\n \"my-component-template\"\n ]\n}\n```\n3. Create a
data stream that matched the index pattern from the index\ntemplate
above:\n```\nPUT _data_stream/my-ds-1\n```\n4. Go to the data streams
table and verify that the index mode is\ndisplayed correctly in the
table.\n\n<img width=\"1165\" alt=\"Screenshot 2025-03-24 at 18 12
04\"\nsrc=\"https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f\"\n/>\n\n\n5.
Click on the created data stream and verify that the displayed
index\nmode in the details panel is correct:\n\n<img width=\"1165\"
alt=\"Screenshot 2025-03-06 at 14 36
12\"\nsrc=\"https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52\"\n/>\n\n---------\n\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"dec6a17ec02ffea5669ffcf8431009aef1e99cfa","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","backport:version","v9.1.0","v8.19.0"],"title":"[Data
Streams] Fix displayed index
mode","number":215683,"url":"https://github.com/elastic/kibana/pull/215683","mergeCommit":{"message":"[Data
Streams] Fix displayed index mode (#215683)\n\nFixes
https://github.com/elastic/kibana/issues/208671\n\n## Summary\n\nBefore
this PR, the displayed index mode of the data streams was\ndetermined
based on the index mode of the associated index template.\nHowever, the
index mode can also be set through the component template,\nso that
logic is not reliable and can cause incorrectly displayed index\nmode
like described in https://github.com/elastic/kibana/issues/208671.\n\nIn
this PR, we replace this logic with the recently added
`index_mode`\nfield to the Es Get Data Streams API
(see\nhttps://github.com/elastic/elasticsearch/pull/122486).\n\n**How to
test:**\n1. Create a component template with a LogsDB index mode (you
can also\ntest with other index modes):\n```\nPUT
_component_template/my-component-template\n{\n \"template\": {\n
\"settings\": {\n \"index\": {\n \"mode\": \"logsdb\"\n }\n }\n
}\n}\n```\n2. Create an index template that is composed of the component
template\nabove:\n```\nPUT _index_template/my-index-template\n{\n
\"index_patterns\": [\n \"my-ds-*\"\n ],\n \"data_stream\": {},\n
\"composed_of\": [\n \"my-component-template\"\n ]\n}\n```\n3. Create a
data stream that matched the index pattern from the index\ntemplate
above:\n```\nPUT _data_stream/my-ds-1\n```\n4. Go to the data streams
table and verify that the index mode is\ndisplayed correctly in the
table.\n\n<img width=\"1165\" alt=\"Screenshot 2025-03-24 at 18 12
04\"\nsrc=\"https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f\"\n/>\n\n\n5.
Click on the created data stream and verify that the displayed
index\nmode in the details panel is correct:\n\n<img width=\"1165\"
alt=\"Screenshot 2025-03-06 at 14 36
12\"\nsrc=\"https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52\"\n/>\n\n---------\n\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"dec6a17ec02ffea5669ffcf8431009aef1e99cfa"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215683","number":215683,"mergeCommit":{"message":"[Data
Streams] Fix displayed index mode (#215683)\n\nFixes
https://github.com/elastic/kibana/issues/208671\n\n## Summary\n\nBefore
this PR, the displayed index mode of the data streams was\ndetermined
based on the index mode of the associated index template.\nHowever, the
index mode can also be set through the component template,\nso that
logic is not reliable and can cause incorrectly displayed index\nmode
like described in https://github.com/elastic/kibana/issues/208671.\n\nIn
this PR, we replace this logic with the recently added
`index_mode`\nfield to the Es Get Data Streams API
(see\nhttps://github.com/elastic/elasticsearch/pull/122486).\n\n**How to
test:**\n1. Create a component template with a LogsDB index mode (you
can also\ntest with other index modes):\n```\nPUT
_component_template/my-component-template\n{\n \"template\": {\n
\"settings\": {\n \"index\": {\n \"mode\": \"logsdb\"\n }\n }\n
}\n}\n```\n2. Create an index template that is composed of the component
template\nabove:\n```\nPUT _index_template/my-index-template\n{\n
\"index_patterns\": [\n \"my-ds-*\"\n ],\n \"data_stream\": {},\n
\"composed_of\": [\n \"my-component-template\"\n ]\n}\n```\n3. Create a
data stream that matched the index pattern from the index\ntemplate
above:\n```\nPUT _data_stream/my-ds-1\n```\n4. Go to the data streams
table and verify that the index mode is\ndisplayed correctly in the
table.\n\n<img width=\"1165\" alt=\"Screenshot 2025-03-24 at 18 12
04\"\nsrc=\"https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f\"\n/>\n\n\n5.
Click on the created data stream and verify that the displayed
index\nmode in the details panel is correct:\n\n<img width=\"1165\"
alt=\"Screenshot 2025-03-06 at 14 36
12\"\nsrc=\"https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52\"\n/>\n\n---------\n\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"dec6a17ec02ffea5669ffcf8431009aef1e99cfa"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Elena Stoeva <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
1 parent 0123be6 commit 3348eaa
File tree
3 files changed
+18
-34
lines changed- x-pack
- test_serverless/functional/test_suites/common/management/index_management
- test/functional/apps/index_management/data_streams_tab
3 files changed
+18
-34
lines changedLines changed: 0 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
| |||
74 | 71 | | |
75 | 72 | | |
76 | 73 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 74 | | |
88 | 75 | | |
89 | 76 | | |
| |||
174 | 161 | | |
175 | 162 | | |
176 | 163 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | 164 | | |
181 | 165 | | |
182 | 166 | | |
| |||
194 | 178 | | |
195 | 179 | | |
196 | 180 | | |
197 | | - | |
198 | 181 | | |
199 | 182 | | |
200 | 183 | | |
| |||
245 | 228 | | |
246 | 229 | | |
247 | 230 | | |
248 | | - | |
249 | 231 | | |
250 | 232 | | |
251 | 233 | | |
252 | 234 | | |
253 | 235 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | 236 | | |
266 | 237 | | |
267 | 238 | | |
268 | 239 | | |
269 | 240 | | |
270 | 241 | | |
271 | | - | |
272 | 242 | | |
273 | 243 | | |
274 | 244 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
290 | 295 | | |
291 | 296 | | |
292 | 297 | | |
| |||
342 | 347 | | |
343 | 348 | | |
344 | 349 | | |
345 | | - | |
| 350 | + | |
| 351 | + | |
346 | 352 | | |
347 | 353 | | |
348 | 354 | | |
| |||
364 | 370 | | |
365 | 371 | | |
366 | 372 | | |
367 | | - | |
| 373 | + | |
| 374 | + | |
368 | 375 | | |
369 | 376 | | |
370 | 377 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| |||
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
269 | | - | |
| 274 | + | |
| 275 | + | |
270 | 276 | | |
271 | 277 | | |
272 | 278 | | |
| |||
287 | 293 | | |
288 | 294 | | |
289 | 295 | | |
290 | | - | |
| 296 | + | |
| 297 | + | |
291 | 298 | | |
292 | 299 | | |
293 | 300 | | |
| |||
0 commit comments