Add datastream lifecycle support to indices metadata#245548
Merged
szaffarano merged 2 commits intoelastic:mainfrom Dec 8, 2025
Merged
Add datastream lifecycle support to indices metadata#245548szaffarano merged 2 commits intoelastic:mainfrom
szaffarano merged 2 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
Contributor
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
cc @szaffarano |
dejadavi-el
reviewed
Dec 8, 2025
x-pack/platform/plugins/private/indices_metadata/server/lib/services/receiver.ts
Show resolved
Hide resolved
dejadavi-el
approved these changes
Dec 8, 2025
Contributor
dejadavi-el
left a comment
There was a problem hiding this comment.
✅ LGTM for adding the additional datastream lifecycle fields to what we already have
Contributor
|
Starting backport for target branches: 9.1, 9.2 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Dec 8, 2025
## Summary Add [Datastream life cycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream) support to the indices metadata plugin. For data streams using DSL, the plugin now also queries the `data_retention` and includes it in the EBT document. Example document returned by `GET _data_stream/<ds name>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention` ```json { "data_streams": [ { "name": "dsl-test", "indices": [ { "index_name": ".ds-dsl-test-2025.12.08-000001", "index_uuid": "h9nu5fEIQJ-ObVemiXTPqg", "managed_by": "Data stream lifecycle", "prefer_ilm": true, "index_mode": "standard" }, { "index_name": ".ds-dsl-test-2025.12.08-000002", "index_uuid": "VKp5OURcTIquxTmatmNz3g", "managed_by": "Data stream lifecycle", "prefer_ilm": true, "index_mode": "standard" } ], "lifecycle": { "enabled": true, "data_retention": "1h" } } ] } ``` ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit f6550e8)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Dec 8, 2025
## Summary Add [Datastream life cycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream) support to the indices metadata plugin. For data streams using DSL, the plugin now also queries the `data_retention` and includes it in the EBT document. Example document returned by `GET _data_stream/<ds name>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention` ```json { "data_streams": [ { "name": "dsl-test", "indices": [ { "index_name": ".ds-dsl-test-2025.12.08-000001", "index_uuid": "h9nu5fEIQJ-ObVemiXTPqg", "managed_by": "Data stream lifecycle", "prefer_ilm": true, "index_mode": "standard" }, { "index_name": ".ds-dsl-test-2025.12.08-000002", "index_uuid": "VKp5OURcTIquxTmatmNz3g", "managed_by": "Data stream lifecycle", "prefer_ilm": true, "index_mode": "standard" } ], "lifecycle": { "enabled": true, "data_retention": "1h" } } ] } ``` ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit f6550e8)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Dec 8, 2025
…245566) # Backport This will backport the following commits from `main` to `9.1`: - [Add datastream lifecycle support to indices metadata (#245548)](#245548) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sebastián Zaffarano","email":"sebastian.zaffarano@elastic.co"},"sourceCommit":{"committedDate":"2025-12-08T19:06:30Z","message":"Add datastream lifecycle support to indices metadata (#245548)\n\n## Summary\n\nAdd [Datastream life\ncycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream)\nsupport to the indices metadata plugin.\n\nFor data streams using DSL, the plugin now also queries the\n`data_retention` and includes it in the EBT document.\n\nExample document returned by `GET _data_stream/<ds\nname>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention`\n\n```json\n{\n \"data_streams\": [\n {\n \"name\": \"dsl-test\",\n \"indices\": [\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000001\",\n \"index_uuid\": \"h9nu5fEIQJ-ObVemiXTPqg\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n },\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000002\",\n \"index_uuid\": \"VKp5OURcTIquxTmatmNz3g\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n }\n ],\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"1h\"\n }\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"f6550e8b686814584a6b48afa28920171ecb44ba","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team: SecuritySolution","backport:version","v9.3.0","v9.2.3","v9.1.9"],"title":"Add datastream lifecycle support to indices metadata","number":245548,"url":"https://github.com/elastic/kibana/pull/245548","mergeCommit":{"message":"Add datastream lifecycle support to indices metadata (#245548)\n\n## Summary\n\nAdd [Datastream life\ncycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream)\nsupport to the indices metadata plugin.\n\nFor data streams using DSL, the plugin now also queries the\n`data_retention` and includes it in the EBT document.\n\nExample document returned by `GET _data_stream/<ds\nname>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention`\n\n```json\n{\n \"data_streams\": [\n {\n \"name\": \"dsl-test\",\n \"indices\": [\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000001\",\n \"index_uuid\": \"h9nu5fEIQJ-ObVemiXTPqg\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n },\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000002\",\n \"index_uuid\": \"VKp5OURcTIquxTmatmNz3g\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n }\n ],\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"1h\"\n }\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"f6550e8b686814584a6b48afa28920171ecb44ba"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/245548","number":245548,"mergeCommit":{"message":"Add datastream lifecycle support to indices metadata (#245548)\n\n## Summary\n\nAdd [Datastream life\ncycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream)\nsupport to the indices metadata plugin.\n\nFor data streams using DSL, the plugin now also queries the\n`data_retention` and includes it in the EBT document.\n\nExample document returned by `GET _data_stream/<ds\nname>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention`\n\n```json\n{\n \"data_streams\": [\n {\n \"name\": \"dsl-test\",\n \"indices\": [\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000001\",\n \"index_uuid\": \"h9nu5fEIQJ-ObVemiXTPqg\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n },\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000002\",\n \"index_uuid\": \"VKp5OURcTIquxTmatmNz3g\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n }\n ],\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"1h\"\n }\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"f6550e8b686814584a6b48afa28920171ecb44ba"}},{"branch":"9.2","label":"v9.2.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sebastián Zaffarano <sebastian.zaffarano@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Dec 8, 2025
…245567) # Backport This will backport the following commits from `main` to `9.2`: - [Add datastream lifecycle support to indices metadata (#245548)](#245548) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Sebastián Zaffarano","email":"sebastian.zaffarano@elastic.co"},"sourceCommit":{"committedDate":"2025-12-08T19:06:30Z","message":"Add datastream lifecycle support to indices metadata (#245548)\n\n## Summary\n\nAdd [Datastream life\ncycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream)\nsupport to the indices metadata plugin.\n\nFor data streams using DSL, the plugin now also queries the\n`data_retention` and includes it in the EBT document.\n\nExample document returned by `GET _data_stream/<ds\nname>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention`\n\n```json\n{\n \"data_streams\": [\n {\n \"name\": \"dsl-test\",\n \"indices\": [\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000001\",\n \"index_uuid\": \"h9nu5fEIQJ-ObVemiXTPqg\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n },\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000002\",\n \"index_uuid\": \"VKp5OURcTIquxTmatmNz3g\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n }\n ],\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"1h\"\n }\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"f6550e8b686814584a6b48afa28920171ecb44ba","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team: SecuritySolution","backport:version","v9.3.0","v9.2.3","v9.1.9"],"title":"Add datastream lifecycle support to indices metadata","number":245548,"url":"https://github.com/elastic/kibana/pull/245548","mergeCommit":{"message":"Add datastream lifecycle support to indices metadata (#245548)\n\n## Summary\n\nAdd [Datastream life\ncycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream)\nsupport to the indices metadata plugin.\n\nFor data streams using DSL, the plugin now also queries the\n`data_retention` and includes it in the EBT document.\n\nExample document returned by `GET _data_stream/<ds\nname>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention`\n\n```json\n{\n \"data_streams\": [\n {\n \"name\": \"dsl-test\",\n \"indices\": [\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000001\",\n \"index_uuid\": \"h9nu5fEIQJ-ObVemiXTPqg\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n },\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000002\",\n \"index_uuid\": \"VKp5OURcTIquxTmatmNz3g\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n }\n ],\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"1h\"\n }\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"f6550e8b686814584a6b48afa28920171ecb44ba"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/245548","number":245548,"mergeCommit":{"message":"Add datastream lifecycle support to indices metadata (#245548)\n\n## Summary\n\nAdd [Datastream life\ncycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream)\nsupport to the indices metadata plugin.\n\nFor data streams using DSL, the plugin now also queries the\n`data_retention` and includes it in the EBT document.\n\nExample document returned by `GET _data_stream/<ds\nname>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention`\n\n```json\n{\n \"data_streams\": [\n {\n \"name\": \"dsl-test\",\n \"indices\": [\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000001\",\n \"index_uuid\": \"h9nu5fEIQJ-ObVemiXTPqg\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n },\n {\n \"index_name\": \".ds-dsl-test-2025.12.08-000002\",\n \"index_uuid\": \"VKp5OURcTIquxTmatmNz3g\",\n \"managed_by\": \"Data stream lifecycle\",\n \"prefer_ilm\": true,\n \"index_mode\": \"standard\"\n }\n ],\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"1h\"\n }\n }\n ]\n}\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"f6550e8b686814584a6b48afa28920171ecb44ba"}},{"branch":"9.2","label":"v9.2.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Sebastián Zaffarano <sebastian.zaffarano@elastic.co>
mbondyra
added a commit
to mbondyra/kibana
that referenced
this pull request
Dec 8, 2025
* commit '6647f813c9fa03ac0378e3d4756246e8dc4b4c76': (33 commits) [Detection Engine] Extracts Rules/Alerts/Exceptions permission to new Rules feature privileges (elastic#239634) [Agent Builder] Add Intro Tour (elastic#245551) Add datastream lifecycle support to indices metadata (elastic#245548) [Serverless] Update preconfigured connectors (elastic#245445) [Metrics][Discover] Discover to prefer line chars for time series data (elastic#244595) Update dependency @elastic/ebt to ^1.4.1 (main) (elastic#241629) [One Workflow] fix: request bodies with oneof schemas (`kibana.SetAlertsStatus`, etc) (elastic#245344) Update dependency ai to v5 (elastic#244675) Fix Discover trace waterfall behavior with duplicate spans (elastic#244984) [FSH] Migrated fs usage to kbn/fs for sample ingest (elastic#244163) Streamlang: Unskip type coercion test (elastic#245519) [Response Ops][Reporting] Fixing error in calculating delay value between retries (elastic#245431) Add TopNavMenuBeta to navigation plugin (elastic#243578) [scout] support custom servers configuration (elastic#244306) [Fleet] Run agentless background sync without dry run (elastic#245286) Fix Change Password Flaky Test (elastic#245443) Add new gap fill status for rules (elastic#242595) [Kibana Search] Move SLOs higher up in search results (elastic#245518) feat(slo): introduce find SLO instances internal route (elastic#245333) [FSH] Dropped unnecessary `fs` persistence for synthetics project code (elastic#244338) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Datastream life cycle support to the indices metadata plugin.
For data streams using DSL, the plugin now also queries the
data_retentionand includes it in the EBT document.Example document returned by
GET _data_stream/<ds name>/?filter_path=data_streams.name,data_streams.indices,data_streams.lifecycle.enabled,data_streams.lifecycle.data_retention{ "data_streams": [ { "name": "dsl-test", "indices": [ { "index_name": ".ds-dsl-test-2025.12.08-000001", "index_uuid": "h9nu5fEIQJ-ObVemiXTPqg", "managed_by": "Data stream lifecycle", "prefer_ilm": true, "index_mode": "standard" }, { "index_name": ".ds-dsl-test-2025.12.08-000002", "index_uuid": "VKp5OURcTIquxTmatmNz3g", "managed_by": "Data stream lifecycle", "prefer_ilm": true, "index_mode": "standard" } ], "lifecycle": { "enabled": true, "data_retention": "1h" } } ] }Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.