Skip to content

Commit

Permalink
Set feature flags for IndexTemplatesV2 in top-level gradle file (#53898)
Browse files Browse the repository at this point in the history
Resolves #53892
  • Loading branch information
dakrone authored Mar 20, 2020
1 parent f0674af commit 1f3de2f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 26 deletions.
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -547,3 +547,14 @@ allprojects {
}
}
}

// TODO: remove this once 7.7 is released and the 7.x branch is 7.8
subprojects {
pluginManager.withPlugin('elasticsearch.testclusters') {
testClusters.all {
if (org.elasticsearch.gradle.info.BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.itv2_feature_flag_registered', 'true'
}
}
}
}
7 changes: 0 additions & 7 deletions distribution/archives/integ-test-zip/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.elasticsearch.gradle.info.BuildParams
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
Expand Down Expand Up @@ -33,9 +32,3 @@ integTest.runner {
systemProperty 'tests.logfile', '--external--'
}
}

testClusters.integTest {
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.itv2_feature_flag_registered', 'true'
}
}
8 changes: 0 additions & 8 deletions qa/smoke-test-multinode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
* under the License.
*/

import org.elasticsearch.gradle.info.BuildParams

apply plugin: 'elasticsearch.testclusters'
apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
Expand Down Expand Up @@ -48,9 +46,3 @@ integTest.runner {
].join(',')
}
}

testClusters.integTest {
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.itv2_feature_flag_registered', 'true'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,6 @@ public class ActionModule extends AbstractModule {

static {
final String property = System.getProperty("es.itv2_feature_flag_registered");
if (Build.CURRENT.isSnapshot() && property != null) {
throw new IllegalArgumentException("es.itv2_feature_flag_registered is only supported in non-snapshot builds");
}
if (Build.CURRENT.isSnapshot() || "true".equals(property)) {
ITV2_FEATURE_FLAG_REGISTERED = true;
} else if ("false".equals(property) || property == null) {
Expand Down
8 changes: 0 additions & 8 deletions x-pack/qa/core-rest-tests-with-security/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.elasticsearch.gradle.info.BuildParams

apply plugin: 'elasticsearch.testclusters'
apply plugin: 'elasticsearch.standalone-rest-test'
apply plugin: 'elasticsearch.rest-test'
Expand Down Expand Up @@ -39,9 +37,3 @@ testClusters.integTest {
user username: System.getProperty('tests.rest.cluster.username', 'test_user'),
password: System.getProperty('tests.rest.cluster.password', 'x-pack-test-password')
}

testClusters.integTest {
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.itv2_feature_flag_registered', 'true'
}
}

0 comments on commit 1f3de2f

Please sign in to comment.