Skip to content

Commit 984670b

Browse files
authored
Set feature flags for IndexTemplatesV2 and Data Streams in top… (#53897)
Resolves #53892
1 parent 290d58b commit 984670b

File tree

5 files changed

+12
-33
lines changed

5 files changed

+12
-33
lines changed

build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,3 +545,15 @@ allprojects {
545545
}
546546
}
547547
}
548+
549+
// TODO: remove this once 7.7 is released and the 7.x branch is 7.8
550+
subprojects {
551+
pluginManager.withPlugin('elasticsearch.testclusters') {
552+
testClusters.all {
553+
if (org.elasticsearch.gradle.info.BuildParams.isSnapshotBuild() == false) {
554+
systemProperty 'es.itv2_feature_flag_registered', 'true'
555+
systemProperty 'es.datastreams_feature_flag_registered', 'true'
556+
}
557+
}
558+
}
559+
}

distribution/archives/integ-test-zip/build.gradle

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import org.elasticsearch.gradle.info.BuildParams
21
/*
32
* Licensed to Elasticsearch under one or more contributor
43
* license agreements. See the NOTICE file distributed with
@@ -33,10 +32,3 @@ integTest.runner {
3332
systemProperty 'tests.logfile', '--external--'
3433
}
3534
}
36-
37-
testClusters.integTest {
38-
if (BuildParams.isSnapshotBuild() == false) {
39-
systemProperty 'es.itv2_feature_flag_registered', 'true'
40-
systemProperty 'es.datastreams_feature_flag_registered', 'true'
41-
}
42-
}

qa/smoke-test-multinode/build.gradle

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
import org.elasticsearch.gradle.info.BuildParams
20-
21-
import org.elasticsearch.gradle.info.BuildParams
2219

2320
apply plugin: 'elasticsearch.testclusters'
2421
apply plugin: 'elasticsearch.standalone-rest-test'
@@ -49,10 +46,3 @@ integTest.runner {
4946
].join(',')
5047
}
5148
}
52-
53-
testClusters.integTest {
54-
if (BuildParams.isSnapshotBuild() == false) {
55-
systemProperty 'es.itv2_feature_flag_registered', 'true'
56-
systemProperty 'es.datastreams_feature_flag_registered', 'true'
57-
}
58-
}

server/src/main/java/org/elasticsearch/action/ActionModule.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,6 @@ public class ActionModule extends AbstractModule {
381381

382382
static {
383383
final String property = System.getProperty("es.itv2_feature_flag_registered");
384-
if (Build.CURRENT.isSnapshot() && property != null) {
385-
throw new IllegalArgumentException("es.itv2_feature_flag_registered is only supported in non-snapshot builds");
386-
}
387384
if (Build.CURRENT.isSnapshot() || "true".equals(property)) {
388385
ITV2_FEATURE_FLAG_REGISTERED = true;
389386
} else if ("false".equals(property) || property == null) {
@@ -398,9 +395,6 @@ public class ActionModule extends AbstractModule {
398395

399396
static {
400397
final String property = System.getProperty("es.datastreams_feature_flag_registered");
401-
if (Build.CURRENT.isSnapshot() && property != null) {
402-
throw new IllegalArgumentException("es.datastreams_feature_flag_registered is only supported in non-snapshot builds");
403-
}
404398
if (Build.CURRENT.isSnapshot() || "true".equals(property)) {
405399
DATASTREAMS_FEATURE_FLAG_REGISTERED = true;
406400
} else if ("false".equals(property) || property == null) {

x-pack/qa/core-rest-tests-with-security/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.elasticsearch.gradle.info.BuildParams
2-
31
apply plugin: 'elasticsearch.testclusters'
42
apply plugin: 'elasticsearch.standalone-rest-test'
53
apply plugin: 'elasticsearch.rest-test'
@@ -39,10 +37,3 @@ testClusters.integTest {
3937
user username: System.getProperty('tests.rest.cluster.username', 'test_user'),
4038
password: System.getProperty('tests.rest.cluster.password', 'x-pack-test-password')
4139
}
42-
43-
testClusters.integTest {
44-
if (BuildParams.isSnapshotBuild() == false) {
45-
systemProperty 'es.itv2_feature_flag_registered', 'true'
46-
systemProperty 'es.datastreams_feature_flag_registered', 'true'
47-
}
48-
}

0 commit comments

Comments
 (0)