kibana/x-pack/test
Elena Stoeva dec6a17ec0
[Data Streams] Fix displayed index mode (#215683)
Fixes https://github.com/elastic/kibana/issues/208671

## Summary

Before this PR, the displayed index mode of the data streams was
determined based on the index mode of the associated index template.
However, the index mode can also be set through the component template,
so that logic is not reliable and can cause incorrectly displayed index
mode like described in https://github.com/elastic/kibana/issues/208671.

In this PR, we replace this logic with the recently added `index_mode`
field to the Es Get Data Streams API (see
https://github.com/elastic/elasticsearch/pull/122486).

**How to test:**
1. Create a component template with a LogsDB index mode (you can also
test with other index modes):
```
PUT _component_template/my-component-template
{
  "template": {
    "settings": {
      "index": {
        "mode": "logsdb"
      }
    }
  }
}
```
2. Create an index template that is composed of the component template
above:
```
PUT _index_template/my-index-template
{
  "index_patterns": [
    "my-ds-*"
  ],
  "data_stream": {},
  "composed_of": [
    "my-component-template"
  ]
}
```
3. Create a data stream that matched the index pattern from the index
template above:
```
PUT _data_stream/my-ds-1
```
4. Go to the data streams table and verify that the index mode is
displayed correctly in the table.

<img width="1165" alt="Screenshot 2025-03-24 at 18 12 04"
src="https://github.com/user-attachments/assets/ea211c14-3d03-49c7-ace7-88b15e294d1f"
/>


5. Click on the created data stream and verify that the displayed index
mode in the details panel is correct:

<img width="1165" alt="Screenshot 2025-03-06 at 14 36 12"
src="https://github.com/user-attachments/assets/954864e2-ae2a-4cb8-9eef-2c5f8b417f52"
/>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-16 15:09:33 +02:00
..
accessibility [ML] Moves job and trained model management features into Stack Management (#204290) 2025-04-08 19:52:16 +02:00
alerting_api_integration [ResponseOps][MaintenanceWindow] Public maintenance window API (#216756) 2025-04-16 11:39:38 +02:00
api_integration [Oblt Onboarding] Remove Custom Logs flow (#216053) 2025-04-16 11:01:18 +02:00
api_integration_basic [Cases] Cases assignees sub feature (#201654) 2025-01-30 17:04:38 +01:00
apm_api_integration [APM] Deprecate old routes, move remaining bits to apm-sources-access (#216507) 2025-04-07 16:37:49 +02:00
apm_cypress [APM] Migrate APM Cypress tests to on_merge from on_merge_unsupported_ftrs (#203991) 2025-01-16 12:57:50 +01:00
automatic_import_api_integration [kbn-scout] add test config category to reporting (#210167) 2025-02-12 11:17:04 +01:00
banners_functional [kbn-scout] add test config category to reporting (#210167) 2025-02-12 11:17:04 +01:00
cases_api_integration [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
cloud_integration [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
cloud_security_posture_api skip failing test suite (#217399) 2025-04-07 23:09:03 +02:00
cloud_security_posture_functional [kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230) 2025-04-15 13:05:49 +02:00
common [workchat] reintegrate into main (#215627) 2025-04-02 11:00:32 +01:00
custom_branding SKA: Relocate /test to /src/platform/test (#210956) 2025-03-14 16:57:23 +00:00
dataset_quality_api_integration fix skip failing test suite (#211517, #213290) 2025-03-06 10:32:57 -06:00
defend_workflows_cypress [EDR Workflows] Workflow Insights - Cypress (#204562) 2025-01-31 14:43:08 +01:00
disable_ems
encrypted_saved_objects_api_integration [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
examples [Response Ops][Rules] Settings as Flyout instead of Modal (#216162) 2025-04-01 09:59:25 +02:00
fleet_api_integration skip flaky suite (#214862) 2025-04-10 21:25:39 +01:00
fleet_cypress [Fleet] Fix elastic-agent docker image path (#210008) 2025-02-11 22:04:03 +01:00
fleet_functional [Fleet] Fix failing/flaky tests (#189559) 2024-07-31 14:14:30 -04:00
fleet_packages [Fleet] Remove deprecated Symantec package from install_all_packages_job (#193029) 2024-09-17 11:35:00 +02:00
ftr_apis [kbn-scout] add test config category to reporting (#210167) 2025-02-12 11:17:04 +01:00
functional [Data Streams] Fix displayed index mode (#215683) 2025-04-16 15:09:33 +02:00
functional_basic [ML] Moves job and trained model management features into Stack Management (#204290) 2025-04-08 19:52:16 +02:00
functional_cloud [kbn-scout] add test config category to reporting (#210167) 2025-02-12 11:17:04 +01:00
functional_cors [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
functional_embedded [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
functional_execution_context [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
functional_gen_ai/inference [inference] add support for temperature parameter (#206479) 2025-01-14 14:05:21 +01:00
functional_search [ML] Moves job and trained model management features into Stack Management (#204290) 2025-04-08 19:52:16 +02:00
functional_solution_sidenav NavigationItemOpenPanel: remove handling of landing page ("four squares" design) (#210893) 2025-04-09 07:25:30 -07:00
functional_with_es_ssl [ResponseOps][Alerts] Remove fieldsForAad attribute from rule type registry (#215767) 2025-04-09 12:05:05 +02:00
licensing_plugin [FIPS] Skips license check test for FIPS test suite (#216056) 2025-04-01 22:23:35 +01:00
load [ON-WEEK][POC] Playwright (#190803) 2024-09-06 13:09:18 +02:00
localization [Lens] speed up functional test suite by setting the time picker via ui settings (#199479) 2024-11-12 17:40:47 +01:00
monitoring_api_integration SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
observability_ai_assistant_api_integration [Obs AI Assistant] Minor cleanup api tests (#215181) 2025-03-20 10:59:59 +01:00
observability_ai_assistant_functional [Obs AI Assistant] Archiving conversations (#216012) 2025-04-08 10:42:20 -04:00
observability_api_integration [kbn-scout] add test config category to reporting (#210167) 2025-02-12 11:17:04 +01:00
observability_functional skip failing test suite (#217739) 2025-04-11 00:07:54 +02:00
observability_onboarding_api_integration [Oblt Onboarding] Remove Custom Logs flow (#216053) 2025-04-16 11:01:18 +02:00
osquery_cypress [EDR Workflows][Osquery][Cypress] Fallback for KibanaStatus error response when fetching kibana version (#218240) 2025-04-16 10:43:10 +02:00
plugin_api_integration [Entity Analytics][Privilege Monitoring] Engine initialization API (#215663) 2025-04-11 13:25:24 +02:00
plugin_api_perf [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
plugin_functional SKA: Relocate /test to /src/platform/test (#210956) 2025-03-14 16:57:23 +00:00
profiling_api_integration Disable allowAbsoluteUrls for axios (#215138) 2025-03-25 09:52:36 +01:00
profiling_cypress [Profiling] Migrate Profiling Cypress tests to on_merge from on_merge_unsupported_ftrs (#206727) 2025-01-21 17:09:42 +01:00
reporting_api_integration SKA: Relocate /test to /src/platform/test (#210956) 2025-03-14 16:57:23 +00:00
reporting_functional [Reporting] Use Kibana feature privileges only to control access to reporting (#200834) 2024-12-04 09:51:29 -07:00
rule_registry [Observability] Related alerts based on scoring !! (#215673) 2025-04-14 11:35:40 -04:00
saved_object_api_integration SKA: Relocate /test to /src/platform/test (#210956) 2025-03-14 16:57:23 +00:00
saved_object_tagging skip failing test suite (#144057) 2025-04-10 22:31:30 +02:00
saved_objects_field_count [kbn-scout] add test config category to reporting (#210167) 2025-02-12 11:17:04 +01:00
scalability SKA: Relocate /test to /src/platform/test (#210956) 2025-03-14 16:57:23 +00:00
screenshot_creation [Response Ops] [Rule Form] Add Rule Form Flyout v2 (#206685) 2025-03-04 16:52:58 +02:00
search_sessions_integration Unskip discover async search test (#204827) 2025-03-11 09:24:22 -07:00
security_api_integration skip failing test suite (#218378) 2025-04-16 12:08:58 +02:00
security_functional [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
security_solution_api_integration skip failing test suite (#218282) 2025-04-15 18:01:25 +02:00
security_solution_cypress [kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230) 2025-04-15 13:05:49 +02:00
security_solution_endpoint [Security Solution][Endpoint] Improvements to policy selection component (#215417) 2025-04-04 08:35:08 -04:00
security_solution_ftr [kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230) 2025-04-15 13:05:49 +02:00
security_solution_playwright SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
session_view [kbn-scout] add test config category to reporting (#210167) 2025-02-12 11:17:04 +01:00
spaces_api_integration [FTR] unify custom role name with Scout (#217882) 2025-04-14 19:21:49 +02:00
stack_functional_integration [ML] Moves job and trained model management features into Stack Management (#204290) 2025-04-08 19:52:16 +02:00
task_manager_claimer_update_by_query [Authz] Mandatory Security Config (#215180) 2025-03-27 12:04:53 -07:00
ui_capabilities Disable allowAbsoluteUrls for axios (#215138) 2025-03-25 09:52:36 +01:00
upgrade Remove log stream and settings (#204115) 2025-01-10 11:51:12 +00:00
upgrade_assistant_integration Fix deprecations API tests (#215484) 2025-03-24 18:49:42 +02:00
usage_collection Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-core (#201653) 2025-01-04 11:47:24 -07:00
.gitignore SKA: Update and breakdown x-pack/.gitignore (#212341) 2025-02-25 11:34:42 +01:00
kibana.jsonc Sustainable Kibana Architecture: Categorise straightforward packages (#199630) 2024-11-22 10:33:25 +01:00
tsconfig.json 🌊 Refactor API control flow for stream management (#211696) 2025-04-08 13:02:56 +02:00