Enables eql setting in release builds. Relates #51613
This commit is contained in:
parent
adf6083dd0
commit
1acb4aeba9
|
@ -95,9 +95,6 @@ testClusters.all {
|
|||
setting 'xpack.security.authc.api_key.enabled', 'true'
|
||||
setting 'xpack.security.http.ssl.enabled', 'false'
|
||||
setting 'xpack.security.transport.ssl.enabled', 'false'
|
||||
if (BuildParams.isSnapshotBuild() == false) {
|
||||
systemProperty 'es.eql_feature_flag_registered', 'true'
|
||||
}
|
||||
setting 'xpack.eql.enabled', 'true'
|
||||
// Truststore settings are not used since TLS is not enabled. Included for testing the get certificates API
|
||||
setting 'xpack.security.http.ssl.certificate_authorities', 'testnode.crt'
|
||||
|
|
|
@ -54,7 +54,6 @@ testClusters.integTest {
|
|||
setting 'indices.lifecycle.history_index_enabled', 'false'
|
||||
if (BuildParams.isSnapshotBuild() == false) {
|
||||
systemProperty 'es.autoscaling_feature_flag_registered', 'true'
|
||||
systemProperty 'es.eql_feature_flag_registered', 'true'
|
||||
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
|
||||
}
|
||||
setting 'xpack.autoscaling.enabled', 'true'
|
||||
|
|
|
@ -21,12 +21,6 @@ archivesBaseName = 'x-pack-eql'
|
|||
// All integration tests live in qa modules
|
||||
integTest.enabled = false
|
||||
|
||||
tasks.named('internalClusterTest').configure {
|
||||
if (BuildParams.isSnapshotBuild() == false) {
|
||||
systemProperty 'es.eql_feature_flag_registered', 'true'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
||||
compileOnly(project(':modules:lang-painless')) {
|
||||
|
|
|
@ -19,9 +19,7 @@ dependencies {
|
|||
|
||||
testClusters.integTest {
|
||||
testDistribution = 'DEFAULT'
|
||||
if (BuildParams.isSnapshotBuild()) {
|
||||
setting 'xpack.eql.enabled', 'true'
|
||||
}
|
||||
setting 'xpack.eql.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'basic'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
}
|
||||
|
|
|
@ -11,9 +11,7 @@ dependencies {
|
|||
|
||||
testClusters.integTest {
|
||||
testDistribution = 'DEFAULT'
|
||||
if (BuildParams.isSnapshotBuild()) {
|
||||
setting 'xpack.eql.enabled', 'true'
|
||||
}
|
||||
setting 'xpack.eql.enabled', 'true'
|
||||
setting 'xpack.license.self_generated.type', 'basic'
|
||||
setting 'xpack.monitoring.collection.enabled', 'true'
|
||||
setting 'xpack.security.enabled', 'true'
|
||||
|
|
|
@ -49,27 +49,9 @@ public class EqlPlugin extends Plugin implements ActionPlugin {
|
|||
|
||||
private final boolean enabled;
|
||||
|
||||
private static final boolean EQL_FEATURE_FLAG_REGISTERED;
|
||||
|
||||
static {
|
||||
final String property = System.getProperty("es.eql_feature_flag_registered");
|
||||
if (Build.CURRENT.isSnapshot() && property != null) {
|
||||
throw new IllegalArgumentException("es.eql_feature_flag_registered is only supported in non-snapshot builds");
|
||||
}
|
||||
if ("true".equals(property)) {
|
||||
EQL_FEATURE_FLAG_REGISTERED = true;
|
||||
} else if ("false".equals(property) || property == null) {
|
||||
EQL_FEATURE_FLAG_REGISTERED = false;
|
||||
} else {
|
||||
throw new IllegalArgumentException(
|
||||
"expected es.eql_feature_flag_registered to be unset or [true|false] but was [" + property + "]"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static final Setting<Boolean> EQL_ENABLED_SETTING = Setting.boolSetting(
|
||||
"xpack.eql.enabled",
|
||||
false,
|
||||
true,
|
||||
Setting.Property.NodeScope
|
||||
);
|
||||
|
||||
|
@ -106,11 +88,7 @@ public class EqlPlugin extends Plugin implements ActionPlugin {
|
|||
*/
|
||||
@Override
|
||||
public List<Setting<?>> getSettings() {
|
||||
if (isSnapshot() || EQL_FEATURE_FLAG_REGISTERED) {
|
||||
return Collections.singletonList(EQL_ENABLED_SETTING);
|
||||
} else {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return Collections.singletonList(EQL_ENABLED_SETTING);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.test.ESTestCase;
|
||||
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
|
||||
public class EqlPluginTests extends ESTestCase {
|
||||
public void testEnabledSettingRegisteredInSnapshotBuilds() {
|
||||
|
@ -34,6 +33,6 @@ public class EqlPluginTests extends ESTestCase {
|
|||
}
|
||||
|
||||
};
|
||||
assertThat(plugin.getSettings(), not(hasItem(EqlPlugin.EQL_ENABLED_SETTING)));
|
||||
assertThat(plugin.getSettings(), hasItem(EqlPlugin.EQL_ENABLED_SETTING));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue