Skip to content

Conversation

@gmarouli
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

The class `DataStreamLifecycle` is currently capturing the lifecycle
configuration that currently manages all data stream indices, but soon
enough it will be split into two variants, the data and the failures
lifecycle.

Some pre-work has been done already but as we are progressing in our
POC, we see that it will be really useful if the `DataStreamLifecycle`
is "aware" of the target index component. This will allow us to
correctly apply global retention or to throw an error if a downsampling
configuration is provided to a failure lifecycle.

In this PR, we perform a small refactoring to reduce the noise in
elastic#125658. Here we introduce
the following:

- A factory method that creates a data lifecycle, for now it's trivial but it will be more useful soon.
- We rename the "empty" builder to explicitly mention the index component it refers to.

(cherry picked from commit b991708)

# Conflicts:
#	modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceTests.java
#	server/src/test/java/org/elasticsearch/cluster/metadata/MetadataDataStreamsServiceTests.java
#	server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateServiceTests.java
@gmarouli gmarouli added >refactoring :Data Management/Data streams Data streams and their lifecycles labels Apr 23, 2025
@gmarouli gmarouli merged commit 42a6952 into elastic:8.x Apr 23, 2025
15 checks passed
@gmarouli gmarouli deleted the backport/8.x/pr-126487 branch April 23, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants