Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions client/rest-high-level/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,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'
Expand Down
1 change: 0 additions & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 0 additions & 6 deletions x-pack/plugin/eql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down
4 changes: 1 addition & 3 deletions x-pack/plugin/eql/qa/rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
4 changes: 1 addition & 3 deletions x-pack/plugin/eql/qa/security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down Expand Up @@ -99,10 +81,7 @@ private Collection<Object> createComponents(Client client, String clusterName,
*/
@Override
public List<Setting<?>> getSettings() {
if (isSnapshot() || EQL_FEATURE_FLAG_REGISTERED) {
return List.of(EQL_ENABLED_SETTING);
}
return List.of();
return List.of(EQL_ENABLED_SETTING);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
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() {
Expand All @@ -34,6 +33,6 @@ protected boolean isSnapshot() {
}

};
assertThat(plugin.getSettings(), not(hasItem(EqlPlugin.EQL_ENABLED_SETTING)));
assertThat(plugin.getSettings(), hasItem(EqlPlugin.EQL_ENABLED_SETTING));
}
}