Skip to content

Commit c86e664

Browse files
committed
Merge remote-tracking branch 'es/6.x' into ccr-6.x
* es/6.x: (68 commits) Add note to migration docs on silent batch mode (#29365) Allow using distance measure in the geo context precision (#29273) Disable failing query in QueryBuilderBWCIT. Improve similarity integration. (#29187) Fix some query extraction bugs. (#29283) Fixed quote_field_suffix in query_string (#29332) TEST: Update negative byte size setting error msg Fix bwc in GeoDistanceQuery serialization (#29325) Move testMappingConflictRootCause to different class Enhance error for out of bounds byte size settings (#29338) [Docs] Correct javadoc of GetIndexRequest (#29364) Check presence of multi-types before validating new mapping (#29316) Make TransportRankEvalAction members final Pass through script params in scripted metric agg (#29154) Remove silent batch mode from install plugin (#29359) Track Lucene operations in engine explicitly (#29357) Build: Fix Java9 MR build (#29312) Reindex: Fix error in delete-by-query rest spec (#29318) Move Nullable into core (#29341) [Docs] Correct experimental note formatting ...
2 parents 305083b + 739f160 commit c86e664

File tree

337 files changed

+4983
-3245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+4983
-3245
lines changed

.ci/java-versions.properties

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file is used with all of the non-matrix tests in Jenkins.
2+
3+
# This .properties file defines the versions of Java with which to
4+
# build and test Elasticsearch for this branch. Valid Java versions
5+
# are 'java' or 'openjdk' followed by the major release number.
6+
7+
ES_BUILD_JAVA=java10
8+
ES_RUNTIME_JAVA=java8

.ci/matrix-build-javas.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file is used as part of a matrix build in Jenkins where the
2+
# values below are included as an axis of the matrix.
3+
4+
# This axis of the build matrix represents the versions of Java with
5+
# which Elasticsearch will be built. Valid Java versions are 'java'
6+
# or 'openjdk' followed by the major release number.
7+
8+
ES_BUILD_JAVA:
9+
- java10

.ci/matrix-java-exclusions.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is used as part of a matrix build in Jenkins where the
2+
# values below are excluded from the test matrix.
3+
4+
# The yaml mapping below represents a single intersection on the build
5+
# matrix where a test *should not* be run. The value of the exclude
6+
# key is a list of maps.
7+
8+
# In this example all of the combinations defined in the matrix will
9+
# run except for the test that builds with java10 and runs with java8.
10+
# exclude:
11+
# - ES_BUILD_JAVA: java10
12+
# ES_RUNTIME_JAVA: java8
13+
14+
exclude:

.ci/matrix-runtime-javas.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file is used as part of a matrix build in Jenkins where the
2+
# values below are included as an axis of the matrix.
3+
4+
# This axis of the build matrix represents the versions of Java on
5+
# which Elasticsearch will be tested. Valid Java versions are 'java'
6+
# or 'openjdk' followed by the major release number.
7+
8+
ES_RUNTIME_JAVA:
9+
- java8
10+
- java10

TESTING.asciidoc

+4-5
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ e.g. -Dtests.rest.suite=index,get,create/10_with_id
296296
* `tests.rest.blacklist`: comma separated globs that identify tests that are
297297
blacklisted and need to be skipped
298298
e.g. -Dtests.rest.blacklist=index/*/Index document,get/10_basic/*
299-
* `tests.rest.spec`: REST spec path (default /rest-api-spec/api)
300299

301300
Note that the REST tests, like all the integration tests, can be run against an external
302301
cluster by specifying the `tests.cluster` property, which if present needs to contain a
@@ -477,12 +476,12 @@ branch. Finally, on a release branch, it will test against the most recent relea
477476
=== BWC Testing against a specific remote/branch
478477

479478
Sometimes a backward compatibility change spans two versions. A common case is a new functionality
480-
that needs a BWC bridge in and an unreleased versioned of a release branch (for example, 5.x).
479+
that needs a BWC bridge in an unreleased versioned of a release branch (for example, 5.x).
481480
To test the changes, you can instruct Gradle to build the BWC version from a another remote/branch combination instead of
482-
pulling the release branch from GitHub. You do so using the `tests.bwc.remote` and `tests.bwc.refspec` system properties:
481+
pulling the release branch from GitHub. You do so using the `tests.bwc.remote` and `tests.bwc.refspec.BRANCH` system properties:
483482

484483
-------------------------------------------------
485-
./gradlew check -Dtests.bwc.remote=${remote} -Dtests.bwc.refspec=index_req_bwc_5.x
484+
./gradlew check -Dtests.bwc.remote=${remote} -Dtests.bwc.refspec.5.x=index_req_bwc_5.x
486485
-------------------------------------------------
487486

488487
The branch needs to be available on the remote that the BWC makes of the
@@ -497,7 +496,7 @@ will need to:
497496
will contain your change.
498497
. Create a branch called `index_req_bwc_5.x` off `5.x`. This will contain your bwc layer.
499498
. Push both branches to your remote repository.
500-
. Run the tests with `./gradlew check -Dtests.bwc.remote=${remote} -Dtests.bwc.refspec=index_req_bwc_5.x`.
499+
. Run the tests with `./gradlew check -Dtests.bwc.remote=${remote} -Dtests.bwc.refspec.5.x=index_req_bwc_5.x`.
501500

502501
== Test coverage analysis
503502

build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ subprojects {
200200
"org.elasticsearch:elasticsearch:${version}": ':server',
201201
"org.elasticsearch:elasticsearch-cli:${version}": ':server:cli',
202202
"org.elasticsearch:elasticsearch-core:${version}": ':libs:elasticsearch-core',
203-
"org.elasticsearch:elasticsearch-secure-sm:${version}": ':libs:secure-sm',
203+
"org.elasticsearch:elasticsearch-x-content:${version}": ':libs:x-content',
204+
"org.elasticsearch:elasticsearch-secure-sm:${version}": ':libs:secure-sm',
204205
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
205206
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
206207
"org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level',

buildSrc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ dependencies {
9494
compile 'com.netflix.nebula:gradle-info-plugin:3.0.3'
9595
compile 'org.eclipse.jgit:org.eclipse.jgit:3.2.0.201312181205-r'
9696
compile 'com.perforce:p4java:2012.3.551082' // THIS IS SUPPOSED TO BE OPTIONAL IN THE FUTURE....
97-
compile 'de.thetaphi:forbiddenapis:2.4.1'
97+
compile 'de.thetaphi:forbiddenapis:2.5'
9898
compile 'org.apache.rat:apache-rat:0.11'
9999
compile "org.elasticsearch:jna:4.5.1"
100100
}

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

+3-3
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ class BuildPlugin implements Plugin<Project> {
311311
/** Adds repositories used by ES dependencies */
312312
static void configureRepositories(Project project) {
313313
RepositoryHandler repos = project.repositories
314-
if (System.getProperty("repos.mavenlocal") != null) {
315-
// with -Drepos.mavenlocal=true we can force checking the local .m2 repo which is
314+
if (System.getProperty("repos.mavenLocal") != null) {
315+
// with -Drepos.mavenLocal=true we can force checking the local .m2 repo which is
316316
// useful for development ie. bwc tests where we install stuff in the local repository
317317
// such that we don't have to pass hardcoded files to gradle
318318
repos.mavenLocal()
@@ -551,7 +551,7 @@ class BuildPlugin implements Plugin<Project> {
551551
if (project.licenseFile == null || project.noticeFile == null) {
552552
throw new GradleException("Must specify license and notice file for project ${project.path}")
553553
}
554-
jarTask.into('META-INF') {
554+
jarTask.metaInf {
555555
from(project.licenseFile.parent) {
556556
include project.licenseFile.name
557557
}

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class PluginBuildPlugin extends BuildPlugin {
9595
// we "upgrade" these optional deps to provided for plugins, since they will run
9696
// with a full elasticsearch server that includes optional deps
9797
compileOnly "org.locationtech.spatial4j:spatial4j:${project.versions.spatial4j}"
98-
compileOnly "com.vividsolutions:jts:${project.versions.jts}"
98+
compileOnly "org.locationtech.jts:jts-core:${project.versions.jts}"
9999
compileOnly "org.apache.logging.log4j:log4j-api:${project.versions.log4j}"
100100
compileOnly "org.apache.logging.log4j:log4j-core:${project.versions.log4j}"
101101
compileOnly "org.elasticsearch:jna:${project.versions.jna}"

buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy

+17-25
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
package org.elasticsearch.gradle.precommit
2020

21+
import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis
2122
import de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin
2223
import org.gradle.api.Project
2324
import org.gradle.api.Task
@@ -83,17 +84,14 @@ class PrecommitTasks {
8384
getClass().getResource('/forbidden/es-all-signatures.txt')]
8485
suppressAnnotations = ['**.SuppressForbidden']
8586
}
86-
Task mainForbidden = project.tasks.findByName('forbiddenApisMain')
87-
if (mainForbidden != null) {
88-
mainForbidden.configure {
89-
signaturesURLs += getClass().getResource('/forbidden/es-server-signatures.txt')
90-
}
91-
}
92-
Task testForbidden = project.tasks.findByName('forbiddenApisTest')
93-
if (testForbidden != null) {
94-
testForbidden.configure {
95-
signaturesURLs += getClass().getResource('/forbidden/es-test-signatures.txt')
96-
signaturesURLs += getClass().getResource('/forbidden/http-signatures.txt')
87+
project.tasks.withType(CheckForbiddenApis) {
88+
// we do not use the += operator to add signatures, as conventionMappings of Gradle do not work when it's configured using withType:
89+
if (name.endsWith('Test')) {
90+
signaturesURLs = project.forbiddenApis.signaturesURLs +
91+
[ getClass().getResource('/forbidden/es-test-signatures.txt'), getClass().getResource('/forbidden/http-signatures.txt') ]
92+
} else {
93+
signaturesURLs = project.forbiddenApis.signaturesURLs +
94+
[ getClass().getResource('/forbidden/es-server-signatures.txt') ]
9795
}
9896
}
9997
Task forbiddenApis = project.tasks.findByName('forbiddenApis')
@@ -144,21 +142,15 @@ class PrecommitTasks {
144142
]
145143
toolVersion = 7.5
146144
}
147-
for (String taskName : ['checkstyleMain', 'checkstyleJava9', 'checkstyleTest']) {
148-
Task task = project.tasks.findByName(taskName)
149-
if (task != null) {
150-
project.tasks['check'].dependsOn.remove(task)
151-
checkstyleTask.dependsOn(task)
152-
task.dependsOn(copyCheckstyleConf)
153-
task.inputs.file(checkstyleSuppressions)
154-
task.reports {
155-
html.enabled false
156-
}
157-
}
158-
}
159145

160-
project.tasks.withType(Checkstyle) {
161-
dependsOn(copyCheckstyleConf)
146+
project.tasks.withType(Checkstyle) { task ->
147+
project.tasks[JavaBasePlugin.CHECK_TASK_NAME].dependsOn.remove(task)
148+
checkstyleTask.dependsOn(task)
149+
task.dependsOn(copyCheckstyleConf)
150+
task.inputs.file(checkstyleSuppressions)
151+
task.reports {
152+
html.enabled false
153+
}
162154
}
163155

164156
return checkstyleTask

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ class ClusterFormationTasks {
498498
* the short name requiring the path to already exist.
499499
*/
500500
final Object esPluginUtil = "${-> node.binPath().resolve('elasticsearch-plugin').toString()}"
501-
final Object[] args = [esPluginUtil, 'install', file]
501+
final Object[] args = [esPluginUtil, 'install', '--batch', file]
502502
return configureExecTask(name, project, setup, node, args)
503503
}
504504

buildSrc/src/main/resources/checkstyle_suppressions.xml

-2
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@
248248
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]util[/\\]concurrent[/\\]EsExecutors.java" checks="LineLength" />
249249
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]util[/\\]concurrent[/\\]ThreadBarrier.java" checks="LineLength" />
250250
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]util[/\\]concurrent[/\\]ThreadContext.java" checks="LineLength" />
251-
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]xcontent[/\\]XContentFactory.java" checks="LineLength" />
252251
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]xcontent[/\\]XContentHelper.java" checks="LineLength" />
253-
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]common[/\\]xcontent[/\\]smile[/\\]SmileXContent.java" checks="LineLength" />
254252
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]discovery[/\\]Discovery.java" checks="LineLength" />
255253
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]discovery[/\\]DiscoverySettings.java" checks="LineLength" />
256254
<suppress files="server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]discovery[/\\]zen[/\\]ZenDiscovery.java" checks="LineLength" />

buildSrc/version.properties

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
elasticsearch = 6.3.0
2-
lucene = 7.2.1
2+
lucene = 7.3.0-snapshot-98a6b3d
33

44
# optional dependencies
5-
spatial4j = 0.6
6-
jts = 1.13
5+
spatial4j = 0.7
6+
jts = 1.15.0
77
jackson = 2.8.10
88
snakeyaml = 1.17
99
# when updating log4j, please update also docs/java-api/index.asciidoc

0 commit comments

Comments
 (0)