Skip to content

Commit 58591f2

Browse files
committed
Merge branch 'master' into ccr
* master: (31 commits) [TEST] Fix `GeoShapeQueryTests#testPointsOnly` failure Transition transport apis to use void listeners (#27440) AwaitsFix GeoShapeQueryTests#testPointsOnly #27454 Bump test version after backport Ensure nested documents have consistent version and seq_ids (#27455) Tests: Add Fedora-27 to packaging tests Delete some seemingly unused exceptions (#27439) #26800: Fix docs rendering Remove config prompting for secrets and text (#27216) Move the CLI into its own subproject (#27114) Correct usage of "an" to "a" in getting started docs Avoid NPE when getting build information Removes BWC snapshot status handler used in 6.x (#27443) Remove manual tracking of registered channels (#27445) Remove parameters on HandshakeResponseHandler (#27444) [GEO] fix pointsOnly bug for MULTIPOINT Standardize underscore requirements in parameters (#27414) peanut butter hamburgers Log primary-replica resync failures Uses TransportMasterNodeAction to update shard snapshot status (#27165) ...
2 parents c1e2257 + 093218e commit 58591f2

File tree

120 files changed

+1590
-1143
lines changed

Some content is hidden

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

120 files changed

+1590
-1143
lines changed

README.textile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ In order to create a distribution, simply run the @gradle assemble@ command in t
208208

209209
The distribution for each project will be created under the @build/distributions@ directory in that project.
210210

211-
See the "TESTING":TESTING.asciidoc file for more information about
212-
running the Elasticsearch test suite.
211+
See the "TESTING":TESTING.asciidoc file for more information about running the Elasticsearch test suite.
213212

214213
h3. Upgrading from Elasticsearch 1.x?
215214

TESTING.asciidoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ These are the linux flavors the Vagrantfile currently supports:
351351
* debian-9 aka stretch, the current debian stable distribution
352352
* centos-6
353353
* centos-7
354-
* fedora-25
355354
* fedora-26
355+
* fedora-27
356356
* oel-6 aka Oracle Enterprise Linux 6
357357
* oel-7 aka Oracle Enterprise Linux 7
358358
* sles-12
@@ -428,23 +428,23 @@ sudo -E bats $BATS_TESTS/*.bats
428428
You can also use Gradle to prepare the test environment and then starts a single VM:
429429

430430
-------------------------------------------------
431-
gradle vagrantFedora25#up
431+
gradle vagrantFedora27#up
432432
-------------------------------------------------
433433

434434
Or any of vagrantCentos6#up, vagrantCentos7#up, vagrantDebian8#up,
435-
vagrantFedora25#up, vagrantOel6#up, vagrantOel7#up, vagrantOpensuse13#up,
436-
vagrantSles12#up, vagrantUbuntu1404#up, vagrantUbuntu1604#up.
435+
vagrantDebian9#up, vagrantFedora26#up, vagrantFedora27#up, vagrantOel6#up, vagrantOel7#up,
436+
vagrantOpensuse42#up,vagrantSles12#up, vagrantUbuntu1404#up, vagrantUbuntu1604#up.
437437

438438
Once up, you can then connect to the VM using SSH from the elasticsearch directory:
439439

440440
-------------------------------------------------
441-
vagrant ssh fedora-25
441+
vagrant ssh fedora-27
442442
-------------------------------------------------
443443

444444
Or from another directory:
445445

446446
-------------------------------------------------
447-
VAGRANT_CWD=/path/to/elasticsearch vagrant ssh fedora-25
447+
VAGRANT_CWD=/path/to/elasticsearch vagrant ssh fedora-27
448448
-------------------------------------------------
449449

450450
Note: Starting vagrant VM outside of the elasticsearch folder requires to

Vagrantfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ Vagrant.configure(2) do |config|
6060
config.vm.box = "elastic/oraclelinux-7-x86_64"
6161
rpm_common config
6262
end
63-
config.vm.define "fedora-25" do |config|
64-
config.vm.box = "elastic/fedora-25-x86_64"
65-
dnf_common config
66-
end
6763
config.vm.define "fedora-26" do |config|
6864
config.vm.box = "elastic/fedora-26-x86_64"
6965
dnf_common config
7066
end
67+
config.vm.define "fedora-27" do |config|
68+
config.vm.box = "elastic/fedora-27-x86_64"
69+
dnf_common config
70+
end
7171
config.vm.define "opensuse-42" do |config|
7272
config.vm.box = "elastic/opensuse-42-x86_64"
7373
opensuse_common config

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ List<Version> versions = []
8181
// keep track of the previous major version's last minor, so we know where wire compat begins
8282
int prevMinorIndex = -1 // index in the versions list of the last minor from the prev major
8383
int lastPrevMinor = -1 // the minor version number from the prev major we most recently seen
84+
int prevBugfixIndex = -1 // index in the versions list of the last bugfix release from the prev major
8485
for (String line : versionLines) {
8586
/* Note that this skips alphas and betas which is fine because they aren't
8687
* compatible with anything. */
@@ -108,12 +109,19 @@ for (String line : versionLines) {
108109
lastPrevMinor = minor
109110
}
110111
}
112+
if (major == prevMajor) {
113+
prevBugfixIndex = versions.size() - 1
114+
}
111115
}
112116
}
113117
if (versions.toSorted { it.id } != versions) {
114118
println "Versions: ${versions}"
115119
throw new GradleException("Versions.java contains out of order version constants")
116120
}
121+
if (prevBugfixIndex != -1) {
122+
versions[prevBugfixIndex] = new Version(versions[prevBugfixIndex].major, versions[prevBugfixIndex].minor,
123+
versions[prevBugfixIndex].bugfix, versions[prevBugfixIndex].suffix, true)
124+
}
117125
if (currentVersion.bugfix == 0) {
118126
// If on a release branch, after the initial release of that branch, the bugfix version will
119127
// be bumped, and will be != 0. On master and N.x branches, we want to test against the
@@ -223,6 +231,7 @@ subprojects {
223231
"org.elasticsearch.gradle:build-tools:${version}": ':build-tools',
224232
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
225233
"org.elasticsearch:elasticsearch:${version}": ':core',
234+
"org.elasticsearch:elasticsearch-cli:${version}": ':core:cli',
226235
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
227236
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
228237
"org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level',
@@ -262,6 +271,11 @@ subprojects {
262271
ext.projectSubstitutions["org.elasticsearch.distribution.rpm:elasticsearch:${indexCompatVersions[-1]}"] = ':distribution:bwc-release-snapshot'
263272
ext.projectSubstitutions["org.elasticsearch.distribution.zip:elasticsearch:${indexCompatVersions[-1]}"] = ':distribution:bwc-release-snapshot'
264273
}
274+
} else if (indexCompatVersions[-2].snapshot) {
275+
/* This is a terrible hack for the bump to 6.0.1 which will be fixed by #27397 */
276+
ext.projectSubstitutions["org.elasticsearch.distribution.deb:elasticsearch:${indexCompatVersions[-2]}"] = ':distribution:bwc-release-snapshot'
277+
ext.projectSubstitutions["org.elasticsearch.distribution.rpm:elasticsearch:${indexCompatVersions[-2]}"] = ':distribution:bwc-release-snapshot'
278+
ext.projectSubstitutions["org.elasticsearch.distribution.zip:elasticsearch:${indexCompatVersions[-2]}"] = ':distribution:bwc-release-snapshot'
265279
}
266280
project.afterEvaluate {
267281
configurations.all {

buildSrc/src/main/groovy/org/elasticsearch/gradle/vagrant/VagrantTestPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class VagrantTestPlugin implements Plugin<Project> {
1919
'centos-7',
2020
'debian-8',
2121
'debian-9',
22-
'fedora-25',
2322
'fedora-26',
23+
'fedora-27',
2424
'oel-6',
2525
'oel-7',
2626
'opensuse-42',

client/rest-high-level/src/main/java/org/elasticsearch/client/Request.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,23 +191,23 @@ static Request bulk(BulkRequest bulkRequest) throws IOException {
191191
metadata.field("_id", request.id());
192192
}
193193
if (Strings.hasLength(request.routing())) {
194-
metadata.field("_routing", request.routing());
194+
metadata.field("routing", request.routing());
195195
}
196196
if (Strings.hasLength(request.parent())) {
197-
metadata.field("_parent", request.parent());
197+
metadata.field("parent", request.parent());
198198
}
199199
if (request.version() != Versions.MATCH_ANY) {
200-
metadata.field("_version", request.version());
200+
metadata.field("version", request.version());
201201
}
202202

203203
VersionType versionType = request.versionType();
204204
if (versionType != VersionType.INTERNAL) {
205205
if (versionType == VersionType.EXTERNAL) {
206-
metadata.field("_version_type", "external");
206+
metadata.field("version_type", "external");
207207
} else if (versionType == VersionType.EXTERNAL_GTE) {
208-
metadata.field("_version_type", "external_gte");
208+
metadata.field("version_type", "external_gte");
209209
} else if (versionType == VersionType.FORCE) {
210-
metadata.field("_version_type", "force");
210+
metadata.field("version_type", "force");
211211
}
212212
}
213213

@@ -219,7 +219,7 @@ static Request bulk(BulkRequest bulkRequest) throws IOException {
219219
} else if (opType == DocWriteRequest.OpType.UPDATE) {
220220
UpdateRequest updateRequest = (UpdateRequest) request;
221221
if (updateRequest.retryOnConflict() > 0) {
222-
metadata.field("_retry_on_conflict", updateRequest.retryOnConflict());
222+
metadata.field("retry_on_conflict", updateRequest.retryOnConflict());
223223
}
224224
if (updateRequest.fetchSource() != null) {
225225
metadata.field("_source", updateRequest.fetchSource());

core/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dependencies {
5858
compile 'org.elasticsearch:securesm:1.1'
5959

6060
// utilities
61-
compile 'net.sf.jopt-simple:jopt-simple:5.0.2'
61+
compile "org.elasticsearch:elasticsearch-cli:${version}"
6262
compile 'com.carrotsearch:hppc:0.7.1'
6363

6464
// time handling, remove with java 8 time
@@ -265,6 +265,12 @@ if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
265265
dependencyLicenses {
266266
mapping from: /lucene-.*/, to: 'lucene'
267267
mapping from: /jackson-.*/, to: 'jackson'
268+
dependencies = project.configurations.runtime.fileCollection {
269+
it.group.startsWith('org.elasticsearch') == false ||
270+
// keep the following org.elasticsearch jars in
271+
(it.name == 'jna' ||
272+
it.name == 'securesm')
273+
}
268274
}
269275

270276
if (isEclipse == false || project.path == ":core-tests") {

core/cli/build.gradle

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Licensed to Elasticsearch under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import org.elasticsearch.gradle.precommit.PrecommitTasks
21+
22+
apply plugin: 'elasticsearch.build'
23+
24+
archivesBaseName = 'elasticsearch-cli'
25+
26+
dependencies {
27+
compile 'net.sf.jopt-simple:jopt-simple:5.0.2'
28+
}
29+
30+
test.enabled = false
31+
// Since CLI does not depend on :core, it cannot run the jarHell task
32+
jarHell.enabled = false
33+
34+
forbiddenApisMain {
35+
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
36+
}

0 commit comments

Comments
 (0)