Skip to content

[streams][lifecycle] unwired inherit lifecycle#226487

Merged
klacabane merged 25 commits intoelastic:mainfrom
klacabane:226059-refresh-ilm-phases
Jul 9, 2025
Merged

[streams][lifecycle] unwired inherit lifecycle#226487
klacabane merged 25 commits intoelastic:mainfrom
klacabane:226059-refresh-ilm-phases

Conversation

@klacabane
Copy link
Copy Markdown
Contributor

@klacabane klacabane commented Jul 3, 2025

Summary

Closes #222440
Closes #226059

inherit lifecycle will now remove any overrides set at the stream layer and revert back to the data stream's template configuration.

I also took the opportunity to reduce the spinners overload on the lifecycle page when refreshing

@klacabane klacabane marked this pull request as ready for review July 4, 2025 09:35
@klacabane klacabane requested review from a team as code owners July 4, 2025 09:35
);
}

export function getTemplateLifecycle(
Copy link
Copy Markdown
Contributor Author

@klacabane klacabane Jul 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@masseyke as discussed we look at the template to determine what is the fallback lifecycle configuration by a call to _simulate_index. Would love if you could have a look at the logic that figures out the configuration. Maybe it's better to check the unit tests:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it smells a little to implement the template -> active lifecycle logic in Kibana, but I can't think of a better way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran tests that were equivalent to your unit tests in elasticsearch, and got the same results that you're getting. So it looks correct to me.

@klacabane klacabane added release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project v9.1.0 v8.19.0 v9.2.0 labels Jul 4, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

Copy link
Copy Markdown
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as expected, LGMT (one small nit, but non-blocking).

definition: Streams.WiredStream.Definition,
ancestors: Streams.WiredStream.Definition[]
): WiredIngestStreamEffectiveLifecycle {
): (IngestStreamLifecycleDSL | IngestStreamLifecycleILM) & { from: string } {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we change WiredIngestStreamEffectiveLifecycle to this type instead of inlining here? With this change, I can't see why we would still need the old WiredIngestStreamEffectiveLifecycle anymore

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, updated in c125431

);
}

export function getTemplateLifecycle(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it smells a little to implement the template -> active lifecycle logic in Kibana, but I can't think of a better way.

@klacabane klacabane removed the v8.19.0 label Jul 8, 2025
@klacabane klacabane enabled auto-merge (squash) July 8, 2025 17:02
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #96 / Search solution tests Search onboarding API keys Elasticsearch Start [Onboarding Empty State] should create a new api key when the existing one is invalidated
  • [job] [logs] FTR Configs #96 / Search solution tests Search onboarding API keys Elasticsearch Start [Onboarding Empty State] should create a new api key when the existing one is invalidated

History

@klacabane klacabane merged commit 9a46967 into elastic:main Jul 9, 2025
12 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.1

https://github.com/elastic/kibana/actions/runs/16168704907

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 226487

Questions ?

Please refer to the Backport tool documentation

@klacabane
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

klacabane added a commit to klacabane/kibana that referenced this pull request Jul 9, 2025
## Summary

Closes elastic#222440
Closes elastic#226059

`inherit` lifecycle will now remove any overrides set at the stream
layer and revert back to the data stream's template configuration.

I also took the opportunity to reduce the spinners overload on the
lifecycle page when refreshing

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
(cherry picked from commit 9a46967)

# Conflicts:
#	x-pack/platform/plugins/shared/streams/server/lib/streams/state_management/streams/unwired_stream.ts
klacabane added a commit that referenced this pull request Jul 10, 2025
# Backport

This will backport the following commits from `main` to `9.1`:
- [[streams][lifecycle] unwired inherit lifecycle
(#226487)](#226487)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Lacabane","email":"kevin.lacabane@elastic.co"},"sourceCommit":{"committedDate":"2025-07-09T11:59:58Z","message":"[streams][lifecycle]
unwired inherit lifecycle (#226487)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/222440\nCloses
https://github.com/elastic/kibana/issues/226059\n\n`inherit` lifecycle
will now remove any overrides set at the stream\nlayer and revert back
to the data stream's template configuration.\n\nI also took the
opportunity to reduce the spinners overload on the\nlifecycle page when
refreshing\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Joe
Reuter
<johannes.reuter@elastic.co>","sha":"9a469676e6d92031495b14951031d82730c03d7d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-logs","backport:version","Feature:Streams","v9.1.0","v9.2.0"],"title":"[streams][lifecycle]
unwired inherit
lifecycle","number":226487,"url":"https://github.com/elastic/kibana/pull/226487","mergeCommit":{"message":"[streams][lifecycle]
unwired inherit lifecycle (#226487)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/222440\nCloses
https://github.com/elastic/kibana/issues/226059\n\n`inherit` lifecycle
will now remove any overrides set at the stream\nlayer and revert back
to the data stream's template configuration.\n\nI also took the
opportunity to reduce the spinners overload on the\nlifecycle page when
refreshing\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Joe
Reuter
<johannes.reuter@elastic.co>","sha":"9a469676e6d92031495b14951031d82730c03d7d"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226487","number":226487,"mergeCommit":{"message":"[streams][lifecycle]
unwired inherit lifecycle (#226487)\n\n## Summary\n\nCloses
https://github.com/elastic/kibana/issues/222440\nCloses
https://github.com/elastic/kibana/issues/226059\n\n`inherit` lifecycle
will now remove any overrides set at the stream\nlayer and revert back
to the data stream's template configuration.\n\nI also took the
opportunity to reduce the spinners overload on the\nlifecycle page when
refreshing\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Joe
Reuter
<johannes.reuter@elastic.co>","sha":"9a469676e6d92031495b14951031d82730c03d7d"}}]}]
BACKPORT-->
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
## Summary

Closes elastic#222440
Closes elastic#226059

`inherit` lifecycle will now remove any overrides set at the stream
layer and revert back to the data stream's template configuration.

I also took the opportunity to reduce the spinners overload on the
lifecycle page when refreshing

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[streams][lifecycle] refresh all panels [streams][lifecycle] update inherit behavior for classic streams

5 participants