Skip to content

Commit 1acb4ae

Browse files
authored
EQL: Prepare for release (#59331) (#59426)
Enables eql setting in release builds. Relates #51613
1 parent adf6083 commit 1acb4ae

File tree

7 files changed

+5
-42
lines changed

7 files changed

+5
-42
lines changed

client/rest-high-level/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ testClusters.all {
9595
setting 'xpack.security.authc.api_key.enabled', 'true'
9696
setting 'xpack.security.http.ssl.enabled', 'false'
9797
setting 'xpack.security.transport.ssl.enabled', 'false'
98-
if (BuildParams.isSnapshotBuild() == false) {
99-
systemProperty 'es.eql_feature_flag_registered', 'true'
100-
}
10198
setting 'xpack.eql.enabled', 'true'
10299
// Truststore settings are not used since TLS is not enabled. Included for testing the get certificates API
103100
setting 'xpack.security.http.ssl.certificate_authorities', 'testnode.crt'

docs/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ testClusters.integTest {
5454
setting 'indices.lifecycle.history_index_enabled', 'false'
5555
if (BuildParams.isSnapshotBuild() == false) {
5656
systemProperty 'es.autoscaling_feature_flag_registered', 'true'
57-
systemProperty 'es.eql_feature_flag_registered', 'true'
5857
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
5958
}
6059
setting 'xpack.autoscaling.enabled', 'true'

x-pack/plugin/eql/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ archivesBaseName = 'x-pack-eql'
2121
// All integration tests live in qa modules
2222
integTest.enabled = false
2323

24-
tasks.named('internalClusterTest').configure {
25-
if (BuildParams.isSnapshotBuild() == false) {
26-
systemProperty 'es.eql_feature_flag_registered', 'true'
27-
}
28-
}
29-
3024
dependencies {
3125
compileOnly project(path: xpackModule('core'), configuration: 'default')
3226
compileOnly(project(':modules:lang-painless')) {

x-pack/plugin/eql/qa/rest/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ dependencies {
1919

2020
testClusters.integTest {
2121
testDistribution = 'DEFAULT'
22-
if (BuildParams.isSnapshotBuild()) {
23-
setting 'xpack.eql.enabled', 'true'
24-
}
22+
setting 'xpack.eql.enabled', 'true'
2523
setting 'xpack.license.self_generated.type', 'basic'
2624
setting 'xpack.monitoring.collection.enabled', 'true'
2725
}

x-pack/plugin/eql/qa/security/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ dependencies {
1111

1212
testClusters.integTest {
1313
testDistribution = 'DEFAULT'
14-
if (BuildParams.isSnapshotBuild()) {
15-
setting 'xpack.eql.enabled', 'true'
16-
}
14+
setting 'xpack.eql.enabled', 'true'
1715
setting 'xpack.license.self_generated.type', 'basic'
1816
setting 'xpack.monitoring.collection.enabled', 'true'
1917
setting 'xpack.security.enabled', 'true'

x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/plugin/EqlPlugin.java

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,9 @@ public class EqlPlugin extends Plugin implements ActionPlugin {
4949

5050
private final boolean enabled;
5151

52-
private static final boolean EQL_FEATURE_FLAG_REGISTERED;
53-
54-
static {
55-
final String property = System.getProperty("es.eql_feature_flag_registered");
56-
if (Build.CURRENT.isSnapshot() && property != null) {
57-
throw new IllegalArgumentException("es.eql_feature_flag_registered is only supported in non-snapshot builds");
58-
}
59-
if ("true".equals(property)) {
60-
EQL_FEATURE_FLAG_REGISTERED = true;
61-
} else if ("false".equals(property) || property == null) {
62-
EQL_FEATURE_FLAG_REGISTERED = false;
63-
} else {
64-
throw new IllegalArgumentException(
65-
"expected es.eql_feature_flag_registered to be unset or [true|false] but was [" + property + "]"
66-
);
67-
}
68-
}
69-
7052
public static final Setting<Boolean> EQL_ENABLED_SETTING = Setting.boolSetting(
7153
"xpack.eql.enabled",
72-
false,
54+
true,
7355
Setting.Property.NodeScope
7456
);
7557

@@ -106,11 +88,7 @@ public Collection<Module> createGuiceModules() {
10688
*/
10789
@Override
10890
public List<Setting<?>> getSettings() {
109-
if (isSnapshot() || EQL_FEATURE_FLAG_REGISTERED) {
110-
return Collections.singletonList(EQL_ENABLED_SETTING);
111-
} else {
112-
return Collections.emptyList();
113-
}
91+
return Collections.singletonList(EQL_ENABLED_SETTING);
11492
}
11593

11694
@Override

x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/plugin/EqlPluginTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.elasticsearch.test.ESTestCase;
1111

1212
import static org.hamcrest.Matchers.hasItem;
13-
import static org.hamcrest.Matchers.not;
1413

1514
public class EqlPluginTests extends ESTestCase {
1615
public void testEnabledSettingRegisteredInSnapshotBuilds() {
@@ -34,6 +33,6 @@ protected boolean isSnapshot() {
3433
}
3534

3635
};
37-
assertThat(plugin.getSettings(), not(hasItem(EqlPlugin.EQL_ENABLED_SETTING)));
36+
assertThat(plugin.getSettings(), hasItem(EqlPlugin.EQL_ENABLED_SETTING));
3837
}
3938
}

0 commit comments

Comments
 (0)