Skip to content

Commit

Permalink
TSDB: fix reindex failed tests without feature flag (elastic#81967)
Browse files Browse the repository at this point in the history
fix as the elastic#80945 do.

register a settings update consumer for the end_time for
the tsdb index even when the end_time setting wasn't registered.
Pass the feature flag to reindex yaml tests.

Co-authored-by: Igor Motov <[email protected]>
  • Loading branch information
2 people authored and astefan committed Jan 7, 2022
1 parent a146ed7 commit f56c6a8
Show file tree
Hide file tree
Showing 12 changed files with 95 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/reindex/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ testClusters.configureEach {
module ':modules:lang-painless'
// Whitelist reindexing from the local node so we can test reindex-from-remote.
setting 'reindex.remote.whitelist', '127.0.0.1:*'
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

dependencies {
Expand Down Expand Up @@ -173,4 +176,3 @@ tasks.named("yamlRestTestV7CompatTransform").configure { task ->

task.addAllowedWarningRegex("\\[types removal\\].*")
}

8 changes: 8 additions & 0 deletions plugins/analysis-icu/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
Expand Down Expand Up @@ -25,6 +27,12 @@ dependencies {
api "com.ibm.icu:icu4j:${versions.icu4j}"
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

restResources {
restApi {
include '_common', 'indices', 'index', 'search'
Expand Down
8 changes: 8 additions & 0 deletions plugins/mapper-annotated-text/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
Expand All @@ -14,6 +16,12 @@ esplugin {
classname 'org.elasticsearch.index.mapper.annotatedtext.AnnotatedTextPlugin'
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("internalClusterTest").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

restResources {
restApi {
include '_common', 'indices', 'index', 'search'
Expand Down
8 changes: 8 additions & 0 deletions plugins/mapper-murmur3/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
Expand All @@ -19,6 +21,12 @@ dependencies {
testImplementation project(':modules:lang-painless')
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

restResources {
restApi {
include '_common', 'indices', 'index', 'search'
Expand Down
8 changes: 8 additions & 0 deletions x-pack/plugin/analytics/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

apply plugin: 'elasticsearch.internal-es-plugin'
apply plugin: 'elasticsearch.internal-cluster-test'

Expand All @@ -17,3 +19,9 @@ dependencies {
testImplementation(project(":client:rest-high-level"))
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

8 changes: 8 additions & 0 deletions x-pack/plugin/mapper-aggregate-metric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
Expand All @@ -23,3 +25,9 @@ dependencies {
compileOnly project(path: xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}
7 changes: 7 additions & 0 deletions x-pack/plugin/mapper-constant-keyword/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

apply plugin: 'elasticsearch.internal-es-plugin'
apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.internal-yaml-rest-test'
Expand All @@ -16,3 +18,8 @@ dependencies {
internalClusterTestImplementation(testArtifact(project(xpackModule('core'))))
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("internalClusterTest").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}
14 changes: 14 additions & 0 deletions x-pack/plugin/mapper-unsigned-long/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
Expand Down Expand Up @@ -40,3 +42,15 @@ tasks.named("yamlRestTestV7CompatTest").configure {
'50_script_values/script_score query'
].join(',')
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

testClusters.configureEach {
if (BuildParams.isSnapshotBuild() == false) {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}
8 changes: 8 additions & 0 deletions x-pack/plugin/mapper-version/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

evaluationDependsOn(xpackModule('core'))


Expand All @@ -20,3 +22,9 @@ dependencies {
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation project(path: xpackModule('analytics'))
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}
8 changes: 8 additions & 0 deletions x-pack/plugin/spatial/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

apply plugin: 'elasticsearch.internal-es-plugin'
apply plugin: 'elasticsearch.internal-cluster-test'

Expand All @@ -21,3 +23,9 @@ testClusters.configureEach {
testDistribution = 'DEFAULT'
setting 'xpack.security.enabled', 'false'
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}
8 changes: 8 additions & 0 deletions x-pack/plugin/vectors/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

apply plugin: 'elasticsearch.internal-es-plugin'
apply plugin: 'elasticsearch.internal-cluster-test'

Expand All @@ -14,3 +16,9 @@ dependencies {
compileOnly project(path: xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}
7 changes: 7 additions & 0 deletions x-pack/plugin/wildcard/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

apply plugin: 'elasticsearch.internal-es-plugin'

esplugin {
Expand All @@ -13,3 +15,8 @@ dependencies {
testImplementation(testArtifact(project(xpackModule('core'))))
}

if (BuildParams.isSnapshotBuild() == false) {
tasks.named("test").configure {
systemProperty 'es.index_mode_feature_flag_registered', 'true'
}
}

0 comments on commit f56c6a8

Please sign in to comment.