-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Add index mode to get data stream API #122486
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
Add index mode to get data stream API #122486
Conversation
This commit adds the `index_mode` for both the data stream and each backing index to the output of `GET /_data_stream`. An example looks like: ``` { "data_streams" : [ { "name" : "foo-things", "indices" : [ { "index_name" : ".ds-foo-things-2025.02.13-000001", ... "index_mode" : "standard" } ], ... "index_mode" : "standard" }, { "name" : "logs-foo-bar", "indices" : [ { "index_name" : ".ds-logs-foo-bar-2025.02.13-000001", ... "index_mode" : "logsdb" }, { "index_name" : ".ds-logs-foo-bar-2025.02.13-000002", ... "index_mode" : "logsdb" } ], ... "index_mode" : "logsdb", } ] } ```
Warning It looks like this PR modifies one or more |
Documentation preview: |
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @dakrone, I've created a changelog YAML for you. |
Warning It looks like this PR modifies one or more |
Warning It looks like this PR modifies one or more |
Warning It looks like this PR modifies one or more |
Warning It looks like this PR modifies one or more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some questions and minor comments.
// Default to standard mode if not specified; should we set this to "unset" or "unspecified" instead? | ||
indexMode == null ? IndexMode.STANDARD.getName() : indexMode.getName() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the indexMode
can't be resolved here, does it imply that it must have fell back to the default STANDARD
mode or is it possible that it could be something else but just can't be found? If it's the prior then STANDARD
seems fine. Though it would be better if the "fall back to STANDARD mode" logic is already reusable from somewhere else than here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the paranoid case for when we can't resolve it from the data stream template. I can only think of when a data stream gets restored from a snapshot without a template (so we wouldn't be able to resolve anything).
); | ||
var rawMode = addlSettinsg.get(IndexSettings.MODE.getKey()); | ||
if (rawMode != null) { | ||
indexMode = Enum.valueOf(IndexMode.class, rawMode.toUpperCase(Locale.ROOT)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my curiosity, why do we favor the value in settings provider over the index template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The settings provider can override settings at index creation time (it essentially has higher precedence over the template(s))
...s/src/test/java/org/elasticsearch/datastreams/action/TransportGetDataStreamsActionTests.java
Show resolved
Hide resolved
...gin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProvider.java
Outdated
Show resolved
Hide resolved
Warning It looks like this PR modifies one or more |
Warning It looks like this PR modifies one or more |
Warning It looks like this PR modifies one or more |
This commit adds the `index_mode` for both the data stream and each backing index to the output of `GET /_data_stream`. An example looks like: ``` { "data_streams" : [ { "name" : "foo-things", "indices" : [ { "index_name" : ".ds-foo-things-2025.02.13-000001", ... "index_mode" : "standard" } ], ... "index_mode" : "standard" }, { "name" : "logs-foo-bar", "indices" : [ { "index_name" : ".ds-logs-foo-bar-2025.02.13-000001", ... "index_mode" : "logsdb" }, { "index_name" : ".ds-logs-foo-bar-2025.02.13-000002", ... "index_mode" : "logsdb" } ], ... "index_mode" : "logsdb", } ] } ```
* Add the index mode to the output of get-data-stream API. Relates to elastic/elasticsearch#122486 * Run make contrib --------- Co-authored-by: Quentin Pradet <[email protected]>
Fixes #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 #208671. In this PR, we replace this logic with the recently added `index_mode` field to the Es Get Data Streams API (see elastic/elasticsearch#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 <[email protected]>
Fixes elastic#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 elastic#208671. In this PR, we replace this logic with the recently added `index_mode` field to the Es Get Data Streams API (see elastic/elasticsearch#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 <[email protected]>
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
This commit adds the `index_mode` for both the data stream and each backing index to the output of `GET /_data_stream`. An example looks like: ``` { "data_streams" : [ { "name" : "foo-things", "indices" : [ { "index_name" : ".ds-foo-things-2025.02.13-000001", ... "index_mode" : "standard" } ], ... "index_mode" : "standard" }, { "name" : "logs-foo-bar", "indices" : [ { "index_name" : ".ds-logs-foo-bar-2025.02.13-000001", ... "index_mode" : "logsdb" }, { "index_name" : ".ds-logs-foo-bar-2025.02.13-000002", ... "index_mode" : "logsdb" } ], ... "index_mode" : "logsdb", } ] } ``` (cherry picked from commit 47706b5) # Conflicts: # docs/reference/indices/get-data-stream.asciidoc # server/src/main/java/org/elasticsearch/TransportVersions.java # server/src/main/java/org/elasticsearch/action/datastreams/GetDataStreamAction.java # server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java # x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProvider.java # x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProviderTests.java
* Add index mode to get data stream API (#122486) This commit adds the `index_mode` for both the data stream and each backing index to the output of `GET /_data_stream`. An example looks like: ``` { "data_streams" : [ { "name" : "foo-things", "indices" : [ { "index_name" : ".ds-foo-things-2025.02.13-000001", ... "index_mode" : "standard" } ], ... "index_mode" : "standard" }, { "name" : "logs-foo-bar", "indices" : [ { "index_name" : ".ds-logs-foo-bar-2025.02.13-000001", ... "index_mode" : "logsdb" }, { "index_name" : ".ds-logs-foo-bar-2025.02.13-000002", ... "index_mode" : "logsdb" } ], ... "index_mode" : "logsdb", } ] } ``` (cherry picked from commit 47706b5) # Conflicts: # docs/reference/indices/get-data-stream.asciidoc # server/src/main/java/org/elasticsearch/TransportVersions.java # server/src/main/java/org/elasticsearch/action/datastreams/GetDataStreamAction.java # server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java # x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProvider.java # x-pack/plugin/logsdb/src/test/java/org/elasticsearch/xpack/logsdb/LogsdbIndexModeSettingsProviderTests.java * Fix compilation for backport * Fix docs
Fixes elastic#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 elastic#208671. In this PR, we replace this logic with the recently added `index_mode` field to the Es Get Data Streams API (see elastic/elasticsearch#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 <[email protected]> (cherry picked from commit dec6a17)
# 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]>
Fixes elastic#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 elastic#208671. In this PR, we replace this logic with the recently added `index_mode` field to the Es Get Data Streams API (see elastic/elasticsearch#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 <[email protected]>
Fixes #221224 ## Summary This PR fixes the forward-compatibility test for index mode, which failed because the index mode was added to Get Data Streams API in 8.19 and 9.1 (see elastic/elasticsearch#122486), so if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as "Standard" because Es doesn't return an index mode field. In this PR, we separate all index mode-related tests into a separate file, and only run it for Es versions 8.19 or 9.1+.
Fixes elastic#221224 ## Summary This PR fixes the forward-compatibility test for index mode, which failed because the index mode was added to Get Data Streams API in 8.19 and 9.1 (see elastic/elasticsearch#122486), so if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as "Standard" because Es doesn't return an index mode field. In this PR, we separate all index mode-related tests into a separate file, and only run it for Es versions 8.19 or 9.1+. (cherry picked from commit d12b196)
… (#223226) # Backport This will backport the following commits from `main` to `8.19`: - [[Data Streams] Fix forward-compatibility test failures (#223129)](#223129) <!--- 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-06-10T12:38:54Z","message":"[Data Streams] Fix forward-compatibility test failures (#223129)\n\nFixes https://github.com/elastic/kibana/issues/221224\n\n## Summary\n\nThis PR fixes the forward-compatibility test for index mode, which\nfailed because the index mode was added to Get Data Streams API in 8.19\nand 9.1 (see elastic/elasticsearch#122486), so\nif Kibana 8.19 is run with Es 9.0, the index mode is always displayed as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn this PR, we separate all index mode-related tests into a separate\nfile, and only run it for Es versions 8.19 or 9.1+.","sha":"d12b19608af35df7ad1c3b38371819b90c926676","branchLabelMapping":{"^v9.1.0$":"main","^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 forward-compatibility test failures","number":223129,"url":"https://github.com/elastic/kibana/pull/223129","mergeCommit":{"message":"[Data Streams] Fix forward-compatibility test failures (#223129)\n\nFixes https://github.com/elastic/kibana/issues/221224\n\n## Summary\n\nThis PR fixes the forward-compatibility test for index mode, which\nfailed because the index mode was added to Get Data Streams API in 8.19\nand 9.1 (see elastic/elasticsearch#122486), so\nif Kibana 8.19 is run with Es 9.0, the index mode is always displayed as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn this PR, we separate all index mode-related tests into a separate\nfile, and only run it for Es versions 8.19 or 9.1+.","sha":"d12b19608af35df7ad1c3b38371819b90c926676"}},"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/223129","number":223129,"mergeCommit":{"message":"[Data Streams] Fix forward-compatibility test failures (#223129)\n\nFixes https://github.com/elastic/kibana/issues/221224\n\n## Summary\n\nThis PR fixes the forward-compatibility test for index mode, which\nfailed because the index mode was added to Get Data Streams API in 8.19\nand 9.1 (see elastic/elasticsearch#122486), so\nif Kibana 8.19 is run with Es 9.0, the index mode is always displayed as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn this PR, we separate all index mode-related tests into a separate\nfile, and only run it for Es versions 8.19 or 9.1+.","sha":"d12b19608af35df7ad1c3b38371819b90c926676"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Elena Stoeva <[email protected]>
Fixes elastic#221224 ## Summary This PR fixes the forward-compatibility test for index mode, which failed because the index mode was added to Get Data Streams API in 8.19 and 9.1 (see elastic/elasticsearch#122486), so if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as "Standard" because Es doesn't return an index mode field. In this PR, we separate all index mode-related tests into a separate file, and only run it for Es versions 8.19 or 9.1+.
Fixes elastic#221224 ## Summary This PR fixes the forward-compatibility test for index mode, which failed because the index mode was added to Get Data Streams API in 8.19 and 9.1 (see elastic/elasticsearch#122486), so if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as "Standard" because Es doesn't return an index mode field. In this PR, we separate all index mode-related tests into a separate file, and only run it for Es versions 8.19 or 9.1+.
Fixes elastic#221224 ## Summary This PR fixes the forward-compatibility test for index mode, which failed because the index mode was added to Get Data Streams API in 8.19 and 9.1 (see elastic/elasticsearch#122486), so if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as "Standard" because Es doesn't return an index mode field. In this PR, we separate all index mode-related tests into a separate file, and only run it for Es versions 8.19 or 9.1+.
Fixes #223990 ## Summary This PR fixes the forward-compatibility test for index mode, which failed because the index mode was added to Get Data Streams API in 8.19 and 9.1 (see elastic/elasticsearch#122486), so if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as "Standard" because Es doesn't return an index mode field. In this PR, we separate all index mode-related tests into a separate file, and only run it for Es versions 8.19 or 9.1+. This was also fixed for functional tests in #223129 --------- Co-authored-by: kibanamachine <[email protected]>
…24795) Fixes elastic#223990 ## Summary This PR fixes the forward-compatibility test for index mode, which failed because the index mode was added to Get Data Streams API in 8.19 and 9.1 (see elastic/elasticsearch#122486), so if Kibana 8.19 is run with Es 9.0, the index mode is always displayed as "Standard" because Es doesn't return an index mode field. In this PR, we separate all index mode-related tests into a separate file, and only run it for Es versions 8.19 or 9.1+. This was also fixed for functional tests in elastic#223129 --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 493ca9f) # Conflicts: # x-pack/platform/test/api_integration/apis/management/index_management/data_streams.ts
…24795) (#225641) # Backport This will backport the following commits from `main` to `8.19`: - [[Data Streams] Fix forward-compatibility api test failures (#224795)](#224795) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sonia Sanz Vivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-25T11:55:46Z","message":"[Data Streams] Fix forward-compatibility api test failures (#224795)\n\nFixes https://github.com/elastic/kibana/issues/223990\n\n## Summary\n\nThis PR fixes the forward-compatibility test for index mode, which\nfailed because the index mode was added to Get Data Streams API in 8.19\nand 9.1 (see elastic/elasticsearch#122486), so\nif Kibana 8.19 is run with Es 9.0, the index mode is always displayed as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn this PR, we separate all index mode-related tests into a separate\nfile, and only run it for Es versions 8.19 or 9.1+.\n\nThis was also fixed for functional tests in\nhttps://github.com//pull/223129\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"493ca9f1061ab1e451741c6875107d8d16953d23","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","backport missing","backport:version","v9.1.0","v8.19.0"],"title":"[Data Streams] Fix forward-compatibility api test failures","number":224795,"url":"https://github.com/elastic/kibana/pull/224795","mergeCommit":{"message":"[Data Streams] Fix forward-compatibility api test failures (#224795)\n\nFixes https://github.com/elastic/kibana/issues/223990\n\n## Summary\n\nThis PR fixes the forward-compatibility test for index mode, which\nfailed because the index mode was added to Get Data Streams API in 8.19\nand 9.1 (see elastic/elasticsearch#122486), so\nif Kibana 8.19 is run with Es 9.0, the index mode is always displayed as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn this PR, we separate all index mode-related tests into a separate\nfile, and only run it for Es versions 8.19 or 9.1+.\n\nThis was also fixed for functional tests in\nhttps://github.com//pull/223129\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"493ca9f1061ab1e451741c6875107d8d16953d23"}},"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/224795","number":224795,"mergeCommit":{"message":"[Data Streams] Fix forward-compatibility api test failures (#224795)\n\nFixes https://github.com/elastic/kibana/issues/223990\n\n## Summary\n\nThis PR fixes the forward-compatibility test for index mode, which\nfailed because the index mode was added to Get Data Streams API in 8.19\nand 9.1 (see elastic/elasticsearch#122486), so\nif Kibana 8.19 is run with Es 9.0, the index mode is always displayed as\n\"Standard\" because Es doesn't return an index mode field.\n\nIn this PR, we separate all index mode-related tests into a separate\nfile, and only run it for Es versions 8.19 or 9.1+.\n\nThis was also fixed for functional tests in\nhttps://github.com//pull/223129\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"493ca9f1061ab1e451741c6875107d8d16953d23"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Damian Polewski <[email protected]> Co-authored-by: Damian Polewski <[email protected]>
This commit adds the
index_mode
for both the data stream and each backing index to the output ofGET /_data_stream
. An example looks like: