Browse Source

EQL: Prepare for release (#59331)

Enables eql setting in release builds.

Relates #51613
Igor Motov 5 years ago
parent
commit
20874dc6e8

+ 0 - 3
client/rest-high-level/build.gradle

@@ -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'

+ 0 - 1
docs/build.gradle

@@ -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'

+ 0 - 6
x-pack/plugin/eql/build.gradle

@@ -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')) {

+ 1 - 3
x-pack/plugin/eql/qa/rest/build.gradle

@@ -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'
 }

+ 1 - 3
x-pack/plugin/eql/qa/security/build.gradle

@@ -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'

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

@@ -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
     );
 
@@ -99,10 +81,7 @@ public class EqlPlugin extends Plugin implements ActionPlugin {
      */
     @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

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

@@ -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));
     }
 }