Skip to content

Add ability to redirect ingestion failures on data streams to a failure store #126973

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

Merged
merged 18 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove feature flag from test cluster configs
  • Loading branch information
jbaiera committed Apr 16, 2025
commit f9ff7ccba1fdb07e1c6d89273d2ac242588a14dc
4 changes: 0 additions & 4 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ testClusters.matching { it.name == "yamlRestTest"}.configureEach {
setting 'xpack.license.self_generated.type', 'trial'
setting 'indices.lifecycle.history_index_enabled', 'false'
keystorePassword 'keystore-password'
if (buildParams.snapshotBuild == false) {
requiresFeature 'es.failure_store_feature_flag_enabled', new Version(8, 12, 0)
}
}

// debug ccr test failures:
Expand Down Expand Up @@ -126,7 +123,6 @@ testClusters.matching { it.name == "yamlRestTest"}.configureEach {


requiresFeature 'es.index_mode_feature_flag_registered', Version.fromString("8.0.0")
requiresFeature 'es.failure_store_feature_flag_enabled', Version.fromString("8.12.0")

// TODO Rene: clean up this kind of cross project file references
extraConfigFile 'op-jwks.json', project(':x-pack:test:idp-fixture').file("src/main/resources/oidc/op-jwks.json")
Expand Down
6 changes: 0 additions & 6 deletions modules/data-streams/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ if (buildParams.inFipsJvm){
tasks.named("yamlRestTest").configure{enabled = false }
}

if (buildParams.snapshotBuild == false) {
tasks.withType(Test).configureEach {
systemProperty 'es.failure_store_feature_flag_enabled', 'true'
}
}

tasks.named("yamlRestCompatTestTransform").configure({ task ->
task.skipTest("data_stream/10_basic/Create hidden data stream", "warning does not exist for compatibility")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.junit.After;
Expand All @@ -38,7 +37,6 @@ public abstract class AbstractDataStreamIT extends ESRestTestCase {
@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.setting("xpack.security.enabled", "false")
.setting("xpack.watcher.enabled", "false")
// Disable apm-data so the index templates it installs do not impact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.cluster.util.resource.Resource;
import org.elasticsearch.test.rest.ESRestTestCase;
Expand All @@ -29,7 +28,6 @@ public class DataStreamWithSecurityIT extends ESRestTestCase {
@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.setting("xpack.watcher.enabled", "false")
.setting("xpack.ml.enabled", "false")
.setting("xpack.security.enabled", "true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.junit.ClassRule;
Expand All @@ -27,7 +26,6 @@ public abstract class DisabledSecurityDataStreamTestCase extends ESRestTestCase
@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.setting("xpack.security.enabled", "false")
.setting("xpack.watcher.enabled", "false")
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.cluster.util.resource.Resource;
import org.elasticsearch.test.rest.ESRestTestCase;
Expand All @@ -41,7 +40,6 @@ public class LazyRolloverDataStreamIT extends ESRestTestCase {
@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.setting("xpack.watcher.enabled", "false")
.setting("xpack.ml.enabled", "false")
.setting("xpack.security.enabled", "true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.cluster.util.resource.Resource;
import org.elasticsearch.test.rest.ESRestTestCase;
Expand All @@ -46,7 +45,6 @@ public abstract class DataStreamLifecyclePermissionsTestCase extends ESRestTestC
@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.setting("xpack.watcher.enabled", "false")
.setting("xpack.ml.enabled", "false")
.setting("xpack.security.enabled", "true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.junit.ClassRule;

import static org.elasticsearch.test.cluster.FeatureFlag.FAILURE_STORE_ENABLED;

public class DataStreamsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

public DataStreamsClientYamlTestSuiteIT(final ClientYamlTestCandidate testCandidate) {
Expand All @@ -46,7 +44,6 @@ protected Settings restClientSettings() {
private static ElasticsearchCluster createCluster() {
LocalClusterSpecBuilder<ElasticsearchCluster> clusterBuilder = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.feature(FAILURE_STORE_ENABLED)
.setting("xpack.security.enabled", "true")
.keystore("bootstrap.password", "x-pack-test-password")
.user("x_pack_rest_user", "x-pack-test-password")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

import java.util.Objects;

import static org.elasticsearch.test.cluster.FeatureFlag.FAILURE_STORE_ENABLED;

public class DotPrefixClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

public DotPrefixClientYamlTestSuiteIT(final ClientYamlTestCandidate testCandidate) {
Expand All @@ -49,7 +47,6 @@ protected Settings restClientSettings() {
private static ElasticsearchCluster createCluster() {
LocalClusterSpecBuilder<ElasticsearchCluster> clusterBuilder = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.feature(FAILURE_STORE_ENABLED)
.setting("xpack.security.enabled", "true")
.keystore("bootstrap.password", "x-pack-test-password")
.user("x_pack_rest_user", "x-pack-test-password");
Expand Down
2 changes: 0 additions & 2 deletions qa/ccs-rolling-upgrade-remote-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ buildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
versions = [bwcVersion.toString(), project.version]
setting 'cluster.remote.node.attr', 'gateway'
setting 'xpack.security.enabled', 'false'
requiresFeature 'es.failure_store_feature_flag_enabled', new Version(8, 12, 0)
}
def remoteCluster = testClusters.register("${baseName}-remote") {
numberOfNodes = 3
versions = [bwcVersion.toString(), project.version]
firstNode.setting 'node.attr.gateway', 'true'
lastNode.setting 'node.attr.gateway', 'true'
setting 'xpack.security.enabled', 'false'
requiresFeature 'es.failure_store_feature_flag_enabled', new Version(8, 12, 0)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public class FullClusterRestartArchivedSettingsIT extends ParameterizedFullClust
.setting("indices.memory.shard_inactive_time", "60m")
.apply(() -> clusterConfig)
.feature(FeatureFlag.TIME_SERIES_MODE)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.build();

@ClassRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ private static ElasticsearchCluster buildCluster() {
.setting("xpack.security.enabled", "false")
.setting("indices.lifecycle.poll_interval", "5s")
.apply(() -> clusterConfig)
.feature(FeatureFlag.TIME_SERIES_MODE)
.feature(FeatureFlag.FAILURE_STORE_ENABLED);
.feature(FeatureFlag.TIME_SERIES_MODE);

if (oldVersion.before(Version.fromString("8.18.0"))) {
cluster.jvmArg("-da:org.elasticsearch.index.mapper.DocumentMapper");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ private static ElasticsearchCluster buildCluster() {
// some tests rely on the translog not being flushed
.setting("indices.memory.shard_inactive_time", "60m")
.apply(() -> clusterConfig)
.feature(FeatureFlag.TIME_SERIES_MODE)
.feature(FeatureFlag.FAILURE_STORE_ENABLED);
.feature(FeatureFlag.TIME_SERIES_MODE);

if (oldVersion.before(Version.fromString("8.18.0"))) {
cluster.jvmArg("-da:org.elasticsearch.index.mapper.DocumentMapper");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.elasticsearch.index.query.functionscore.RandomScoreFunctionBuilder;
import org.elasticsearch.search.SearchModule;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.LocalClusterConfigProvider;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.xcontent.XContentBuilder;
Expand Down Expand Up @@ -78,7 +77,6 @@ public class QueryBuilderBWCIT extends ParameterizedFullClusterRestartTestCase {
.version(org.elasticsearch.test.cluster.util.Version.fromString(OLD_CLUSTER_VERSION))
.nodes(2)
.setting("xpack.security.enabled", "false")
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.apply(() -> clusterConfig)
.build();

Expand Down
2 changes: 0 additions & 2 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,9 @@ sourceSets.main.compiledBy(generateModulesList, generatePluginsList)
if (buildParams.snapshotBuild == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
systemProperty 'es.failure_store_feature_flag_enabled', 'true'
}
tasks.named("internalClusterTest").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
systemProperty 'es.failure_store_feature_flag_enabled', 'true'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
public enum FeatureFlag {
TIME_SERIES_MODE("es.index_mode_feature_flag_registered=true", Version.fromString("8.0.0"), null),
FAILURE_STORE_ENABLED("es.failure_store_feature_flag_enabled=true", Version.fromString("8.12.0"), null),
SUB_OBJECTS_AUTO_ENABLED("es.sub_objects_auto_feature_flag_enabled=true", Version.fromString("8.16.0"), null),
DOC_VALUES_SKIPPER("es.doc_values_skipper_feature_flag_enabled=true", Version.fromString("8.18.1"), null),
USE_LUCENE101_POSTINGS_FORMAT("es.use_lucene101_postings_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null);
Expand Down
6 changes: 0 additions & 6 deletions x-pack/plugin/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ tasks.named("javaRestTest") {
usesDefaultDistribution("uses the _xpack api")
}

if (buildParams.snapshotBuild == false) {
tasks.withType(Test).configureEach {
systemProperty 'es.failure_store_feature_flag_enabled', 'true'
}
}

if (buildParams.inFipsJvm) {
// Test clusters run with security disabled
tasks.named("javaRestTest").configure { enabled = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.xcontent.XContentParser;
Expand All @@ -37,7 +36,6 @@ public class DataStreamRestIT extends ESRestTestCase {
.setting("xpack.security.enabled", "true")
.setting("xpack.license.self_generated.type", "trial")
.setting("indices.lifecycle.history_index_enabled", "false")
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.keystore("bootstrap.password", "x-pack-test-password")
.user("x_pack_rest_user", "x-pack-test-password")
.systemProperty("es.queryable_built_in_roles_enabled", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.elasticsearch.license.LicenseSettings;
import org.elasticsearch.license.TestUtils;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.xcontent.ToXContent;
import org.elasticsearch.xcontent.XContentBuilder;
Expand All @@ -46,7 +45,6 @@ public class LicenseInstallationIT extends ESRestTestCase {
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.setting("xpack.security.enabled", "true")
.setting("xpack.license.self_generated.type", "trial")
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.keystore("bootstrap.password", "x-pack-test-password")
.user("x_pack_rest_user", "x-pack-test-password")
.systemProperty("es.queryable_built_in_roles_enabled", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.junit.ClassRule;
Expand All @@ -27,7 +26,6 @@ public class StackTemplatesRestIT extends ESRestTestCase {
.distribution(DistributionType.DEFAULT)
.setting("xpack.security.enabled", "true")
.setting("xpack.license.self_generated.type", "trial")
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.keystore("bootstrap.password", "x-pack-test-password")
.user("x_pack_rest_user", "x-pack-test-password")
.systemProperty("es.queryable_built_in_roles_enabled", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.junit.ClassRule;
Expand All @@ -25,7 +24,6 @@ public class XPackCoreClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.setting("xpack.security.enabled", "true")
.setting("xpack.license.self_generated.type", "trial")
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.keystore("bootstrap.password", "x-pack-test-password")
.user("x_pack_rest_user", "x-pack-test-password")
.systemProperty("es.queryable_built_in_roles_enabled", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.elasticsearch.core.Strings;
import org.elasticsearch.core.Tuple;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.cluster.util.resource.Resource;
import org.elasticsearch.test.rest.ObjectPath;
Expand Down Expand Up @@ -45,15 +44,13 @@ public class RemoteClusterSecurityRCS1FailureStoreRestIT extends AbstractRemoteC
.name("fulfilling-cluster")
.nodes(3)
.apply(commonClusterConfig)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.rolesFile(Resource.fromClasspath("roles.yml"))
.build();

queryCluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.name("query-cluster")
.apply(commonClusterConfig)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.rolesFile(Resource.fromClasspath("roles.yml"))
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.core.Tuple;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.cluster.util.resource.Resource;
import org.junit.ClassRule;
Expand All @@ -35,7 +34,6 @@ public class RemoteClusterSecurityRCS2FailureStoreRestIT extends AbstractRemoteC
.distribution(DistributionType.DEFAULT)
.name("fulfilling-cluster")
.apply(commonClusterConfig)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.setting("remote_cluster_server.enabled", "true")
.setting("remote_cluster.port", "0")
.setting("xpack.security.remote_cluster_server.ssl.enabled", "true")
Expand All @@ -49,7 +47,6 @@ public class RemoteClusterSecurityRCS2FailureStoreRestIT extends AbstractRemoteC
.distribution(DistributionType.DEFAULT)
.name("query-cluster")
.apply(commonClusterConfig)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.setting("xpack.security.remote_cluster_client.ssl.enabled", "true")
.setting("xpack.security.remote_cluster_client.ssl.certificate_authorities", "remote-cluster-ca.crt")
.setting("xpack.security.authc.token.enabled", "true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchResponseUtils;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.ObjectPath;
Expand Down Expand Up @@ -52,7 +51,6 @@ public class RemoteClusterWithoutSecurityFailureStoreRestIT extends ESRestTestCa
.distribution(DistributionType.DEFAULT)
.name("fulfilling-cluster")
.nodes(3)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.module("analysis-common")
.setting("xpack.license.self_generated.type", "trial")
.setting("xpack.security.enabled", "false")
Expand All @@ -61,7 +59,6 @@ public class RemoteClusterWithoutSecurityFailureStoreRestIT extends ESRestTestCa
private static ElasticsearchCluster queryCluster = ElasticsearchCluster.local()
.distribution(DistributionType.DEFAULT)
.name("query-cluster")
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.module("analysis-common")
.setting("xpack.license.self_generated.type", "trial")
.setting("xpack.security.enabled", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.elasticsearch.search.SearchResponseUtils;
import org.elasticsearch.test.TestSecurityClient;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.ObjectPath;
import org.elasticsearch.xcontent.XContentBuilder;
Expand Down Expand Up @@ -68,7 +67,6 @@ public class FailureStoreSecurityRestIT extends ESRestTestCase {
@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.apply(SecurityOnTrialLicenseRestTestCase.commonTrialSecurityClusterConfig)
.feature(FeatureFlag.FAILURE_STORE_ENABLED)
.build();

@Override
Expand Down
Loading