[9.5] [Streams] Create Import from other Stream flow (#275948)#278726
Closed
SoniaSanzV wants to merge 2 commits into
Closed
[9.5] [Streams] Create Import from other Stream flow (#275948)#278726SoniaSanzV wants to merge 2 commits into
SoniaSanzV wants to merge 2 commits into
Conversation
Closes elastic#267913 ## Summary - Adds an “Import from another stream” flow to reuse another stream’s lifecycle configuration from the Data lifecycle tab. - Keeps import behavior privilege-aware: the import action is only available when the target stream can update both successful data lifecycle and failure store settings. - Avoids partial imports from sources where failure store cannot be read: source streams without `read_failure_store` are excluded from import candidates. ### Test plan Run this setup in Dev Tools as an admin user: ```http PUT _ilm/policy/logs-import-ilm-downsample-policy { "policy": { "phases": { "hot": { "actions": { "rollover": { "max_primary_shard_size": "50gb" } } }, "warm": { "min_age": "1d", "actions": { "downsample": { "fixed_interval": "1h" } } }, "delete": { "min_age": "30d", "actions": { "delete": {} } } } } } PUT _index_template/logs-import-tsdb-template { "index_patterns": ["logs.import-tsdb-*"], "data_stream": {}, "template": { "settings": { "index.mode": "time_series", "index.routing_path": ["service.name"], "index.lifecycle.prefer_ilm": false }, "mappings": { "properties": { "@timestamp": { "type": "date" }, "service.name": { "type": "keyword", "time_series_dimension": true }, "message": { "type": "match_only_text" } } } } } PUT _index_template/logs-import-standard-template { "index_patterns": ["logs.import-standard-*"], "data_stream": {}, "template": { "settings": { "index.lifecycle.prefer_ilm": false }, "mappings": { "properties": { "@timestamp": { "type": "date" }, "message": { "type": "match_only_text" } } } } } POST kbn:/internal/streams/_create_classic { "name": "logs.import-tsdb-source-downsample", "description": "DSL source with downsampling", "ingest": { "lifecycle": { "dsl": { "data_retention": "30d", "downsample": [{ "after": "1d", "fixed_interval": "1h" }] } }, "processing": { "steps": [] }, "settings": {}, "failure_store": { "lifecycle": { "enabled": { "data_retention": "14d" } } }, "classic": {} } } POST kbn:/internal/streams/_create_classic { "name": "logs.import-tsdb-source-ilm-downsample", "description": "ILM source with downsampling", "ingest": { "lifecycle": { "ilm": { "policy": "logs-import-ilm-downsample-policy" } }, "processing": { "steps": [] }, "settings": {}, "failure_store": { "lifecycle": { "enabled": { "data_retention": "21d" } } }, "classic": {} } } POST kbn:/internal/streams/_create_classic { "name": "logs.import-tsdb-target", "description": "Time series target", "ingest": { "lifecycle": { "dsl": { "data_retention": "7d" } }, "processing": { "steps": [] }, "settings": {}, "failure_store": { "lifecycle": { "enabled": { "data_retention": "7d" } } }, "classic": {} } } POST kbn:/internal/streams/_create_classic { "name": "logs.import-standard-target", "description": "Standard target", "ingest": { "lifecycle": { "dsl": { "data_retention": "7d" } }, "processing": { "steps": [] }, "settings": {}, "failure_store": { "lifecycle": { "enabled": { "data_retention": "7d" } } }, "classic": {} } } ``` Then: - Open Streams and navigate to `logs.import-tsdb-target`. - Go to the Data lifecycle tab. - Open the tab actions menu and click Import from another stream. - Select `logs.import-tsdb-source-downsample` and verify the import option shows the downsampling summary. - Click Apply and verify the target stream imports retention, downsampling, and failure store settings. - Reopen the import flyout, select `logs.import-tsdb-source-ilm-downsample`, inspect the ILM policy, and verify the policy includes a downsample action. - Apply the ILM source and verify the target stream uses `logs-import-ilm-downsample-policy`. - Navigate to `logs.import-standard-target`, import from `logs.import-tsdb-source-downsample`, and verify downsampling is omitted for the non-time-series target. - Optional privilege check: test with a user that has lifecycle privileges but no `manage_failure_store`; verify `Import from another stream` is not shown. ### Evidence https://github.com/user-attachments/assets/811e6b52-eed2-4426-a0f6-a6161603b8c5 <img width="859" height="823" alt="Screenshot 2026-07-10 at 13 55 04" src="https://github.com/user-attachments/assets/b5d27440-865f-4f7e-9ca6-f038dffaa716" /> (cherry picked from commit 996baf8) # Conflicts: # x-pack/platform/plugins/shared/streams_app/public/components/stream_management/data_management/stream_detail_management/classic.tsx # x-pack/platform/plugins/shared/streams_app/public/components/stream_management/data_management/stream_detail_management/lifecycle_tab_label_with_actions.test.tsx # x-pack/platform/plugins/shared/streams_app/public/components/stream_management/data_management/stream_detail_management/lifecycle_tab_label_with_actions.tsx # x-pack/platform/plugins/shared/streams_app/public/components/stream_management/data_management/stream_detail_management/wired.tsx
SoniaSanzV
enabled auto-merge (squash)
July 16, 2026 10:01
kibanamachine
requested review from
juliaElastic
and removed request for
kibanamachine
July 16, 2026 10:01
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
cc @SoniaSanzV |
SoniaSanzV
disabled auto-merge
July 16, 2026 13:37
Contributor
Author
|
it will be backported later in the future |
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.
Backport
This will backport the following commits from
mainto9.5:Questions ?
Please refer to the Backport tool documentation