Skip to content

Commit 842f331

Browse files
committed
Merge branch 'master' into async-errors
* master: Backported synced-flush PR to v5.6.8 and v6.2.2 Move more XContent.createParser calls to non-deprecated version (elastic#28672) Move more XContent.createParser calls to non-deprecated version (elastic#28670) Build: Group archive and package distribution projects (elastic#28673) [DOCS] Add supported token filters [TEST] bump timeout in testFetchShardsSkipUnavailable to 5s Relax remote check for bwc project checkouts (elastic#28666) [TEST] Synchronize searcher list in IndexShardTests [TEST] packaging: function to collect debug info (elastic#28608) Compute declared versions in a static block Docs: Remove references to elasticsearch directory in plugins (elastic#28647) Remove snapshot conditional for bwc snapshots (elastic#28657) Removed redundant JSON object from Put Mapping docs (elastic#28514) Update threadpool.asciidoc target_response_time (elastic#28655)
2 parents f73323e + 452bfc0 commit 842f331

File tree

79 files changed

+635
-435
lines changed

Some content is hidden

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

79 files changed

+635
-435
lines changed

build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ task verifyVersions {
144144
* the enabled state of every bwc task. It should be set back to true
145145
* after the backport of the backcompat code is complete.
146146
*/
147-
final boolean bwc_tests_enabled = true
148-
final String bwc_tests_disabled_issue = "" /* place a PR link here when commiting bwc changes */
147+
final boolean bwc_tests_enabled = false
148+
final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/28673" /* place a PR link here when commiting bwc changes */
149149
if (bwc_tests_enabled == false) {
150150
if (bwc_tests_disabled_issue.isEmpty()) {
151151
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")
@@ -203,11 +203,11 @@ subprojects {
203203
"org.elasticsearch.client:test:${version}": ':client:test',
204204
"org.elasticsearch.client:transport:${version}": ':client:transport',
205205
"org.elasticsearch.test:framework:${version}": ':test:framework',
206-
"org.elasticsearch.distribution.integ-test-zip:elasticsearch:${version}": ':distribution:integ-test-zip',
207-
"org.elasticsearch.distribution.zip:elasticsearch:${version}": ':distribution:zip',
208-
"org.elasticsearch.distribution.tar:elasticsearch:${version}": ':distribution:tar',
209-
"org.elasticsearch.distribution.rpm:elasticsearch:${version}": ':distribution:rpm',
210-
"org.elasticsearch.distribution.deb:elasticsearch:${version}": ':distribution:deb',
206+
"org.elasticsearch.distribution.integ-test-zip:elasticsearch:${version}": ':distribution:archives:integ-test-zip',
207+
"org.elasticsearch.distribution.zip:elasticsearch:${version}": ':distribution:archives:zip',
208+
"org.elasticsearch.distribution.tar:elasticsearch:${version}": ':distribution:archives:tar',
209+
"org.elasticsearch.distribution.rpm:elasticsearch:${version}": ':distribution:packages:rpm',
210+
"org.elasticsearch.distribution.deb:elasticsearch:${version}": ':distribution:packages:deb',
211211
"org.elasticsearch.test:logger-usage:${version}": ':test:logger-usage',
212212
// for transport client
213213
"org.elasticsearch.plugin:transport-netty4-client:${version}": ':modules:transport-netty4',

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ class VagrantTestPlugin implements Plugin<Project> {
114114

115115
DISTRIBUTION_ARCHIVES.each {
116116
// Adds a dependency for the current version
117+
if (it == 'tar') {
118+
it = 'archives:tar'
119+
} else {
120+
it = "packages:${it}"
121+
}
117122
project.dependencies.add(BATS, project.dependencies.project(path: ":distribution:${it}", configuration: 'archives'))
118123
}
119124

buildSrc/src/main/resources/meta-plugin-descriptor.properties

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Elasticsearch meta plugin descriptor file
2-
# This file must exist as 'meta-plugin-descriptor.properties' in a folder named `elasticsearch`.
2+
# This file must exist as 'meta-plugin-descriptor.properties' inside a plugin.
33
#
44
### example meta plugin for "meta-foo"
55
#
66
# meta-foo.zip <-- zip file for the meta plugin, with this structure:
7-
#|____elasticsearch/
8-
#| |____ <bundled_plugin_1> <-- The plugin files for bundled_plugin_1 (the content of the elastisearch directory)
9-
#| |____ <bundled_plugin_2> <-- The plugin files for bundled_plugin_2
10-
#| |____ meta-plugin-descriptor.properties <-- example contents below:
7+
# |____ <bundled_plugin_1> <-- The plugin files for bundled_plugin_1
8+
# |____ <bundled_plugin_2> <-- The plugin files for bundled_plugin_2
9+
# |____ meta-plugin-descriptor.properties <-- example contents below:
1110
#
1211
# description=My meta plugin
1312
# name=meta-foo

buildSrc/src/main/resources/plugin-descriptor.properties

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# Elasticsearch plugin descriptor file
2-
# This file must exist as 'plugin-descriptor.properties' in a folder named `elasticsearch`
3-
# inside all plugins.
2+
# This file must exist as 'plugin-descriptor.properties' inside a plugin.
43
#
54
### example plugin for "foo"
65
#
76
# foo.zip <-- zip file for the plugin, with this structure:
8-
#|____elasticsearch/
9-
#| |____ <arbitrary name1>.jar <-- classes, resources, dependencies
10-
#| |____ <arbitrary nameN>.jar <-- any number of jars
11-
#| |____ plugin-descriptor.properties <-- example contents below:
7+
# |____ <arbitrary name1>.jar <-- classes, resources, dependencies
8+
# |____ <arbitrary nameN>.jar <-- any number of jars
9+
# |____ plugin-descriptor.properties <-- example contents below:
1210
#
1311
# classname=foo.bar.BazPlugin
1412
# description=My cool plugin

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/IndicesClientDocumentationIT.java

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -411,19 +411,21 @@ public void testPutMapping() throws IOException {
411411
request.type("tweet"); // <2>
412412
// end::put-mapping-request
413413

414-
// tag::put-mapping-request-source
415-
request.source(
416-
"{\n" +
417-
" \"tweet\": {\n" +
418-
" \"properties\": {\n" +
419-
" \"message\": {\n" +
420-
" \"type\": \"text\"\n" +
421-
" }\n" +
422-
" }\n" +
423-
" }\n" +
424-
"}", // <1>
425-
XContentType.JSON);
426-
// end::put-mapping-request-source
414+
{
415+
// tag::put-mapping-request-source
416+
request.source(
417+
"{\n" +
418+
" \"properties\": {\n" +
419+
" \"message\": {\n" +
420+
" \"type\": \"text\"\n" +
421+
" }\n" +
422+
" }\n" +
423+
"}", // <1>
424+
XContentType.JSON);
425+
// end::put-mapping-request-source
426+
PutMappingResponse putMappingResponse = client.indices().putMapping(request);
427+
assertTrue(putMappingResponse.isAcknowledged());
428+
}
427429

428430
{
429431
//tag::put-mapping-map
@@ -432,9 +434,7 @@ public void testPutMapping() throws IOException {
432434
message.put("type", "text");
433435
Map<String, Object> properties = new HashMap<>();
434436
properties.put("message", message);
435-
Map<String, Object> tweet = new HashMap<>();
436-
tweet.put("properties", properties);
437-
jsonMap.put("tweet", tweet);
437+
jsonMap.put("properties", properties);
438438
request.source(jsonMap); // <1>
439439
//end::put-mapping-map
440440
PutMappingResponse putMappingResponse = client.indices().putMapping(request);
@@ -445,15 +445,11 @@ public void testPutMapping() throws IOException {
445445
XContentBuilder builder = XContentFactory.jsonBuilder();
446446
builder.startObject();
447447
{
448-
builder.startObject("tweet");
448+
builder.startObject("properties");
449449
{
450-
builder.startObject("properties");
450+
builder.startObject("message");
451451
{
452-
builder.startObject("message");
453-
{
454-
builder.field("type", "text");
455-
}
456-
builder.endObject();
452+
builder.field("type", "text");
457453
}
458454
builder.endObject();
459455
}

distribution/archives/build.gradle

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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.apache.tools.ant.filters.FixCrLfFilter
21+
import org.apache.tools.ant.taskdefs.condition.Os
22+
import org.elasticsearch.gradle.BuildPlugin
23+
import org.elasticsearch.gradle.EmptyDirTask
24+
import org.elasticsearch.gradle.ConcatFilesTask
25+
import org.elasticsearch.gradle.MavenFilteringHack
26+
import org.elasticsearch.gradle.NoticeTask
27+
import org.elasticsearch.gradle.precommit.DependencyLicensesTask
28+
import org.elasticsearch.gradle.precommit.UpdateShasTask
29+
import org.elasticsearch.gradle.test.RunTask
30+
31+
subprojects {
32+
// CopySpec does not make it easy to create an empty director so we create the directory that we want, and then point CopySpec to its
33+
// parent to copy to the root of the distribution
34+
File logs = new File(buildDir, 'logs-hack/logs')
35+
task createLogDir(type: EmptyDirTask) {
36+
dir "${logs}"
37+
dirMode 0755
38+
}
39+
File plugins = new File(buildDir, 'plugins-hack/plugins')
40+
task createPluginsDir(type: EmptyDirTask) {
41+
dir "${plugins}"
42+
dirMode 0755
43+
}
44+
project.ext.archivesFiles = copySpec {
45+
into("elasticsearch-${version}") {
46+
with libFiles
47+
into('config') {
48+
dirMode 0750
49+
fileMode 0660
50+
with configFiles
51+
}
52+
into('bin') {
53+
with copySpec {
54+
with binFiles
55+
from('../../src/main/resources/bin') {
56+
include '*.bat'
57+
filter(FixCrLfFilter, eol: FixCrLfFilter.CrLf.newInstance('crlf'))
58+
}
59+
MavenFilteringHack.filter(it, expansions)
60+
}
61+
}
62+
into('') {
63+
from {
64+
dirMode 0755
65+
logs.getParent()
66+
}
67+
}
68+
into('') {
69+
from {
70+
dirMode 0755
71+
plugins.getParent()
72+
}
73+
}
74+
with commonFiles
75+
with noticeFile
76+
from('../../src/main/resources') {
77+
include 'bin/*.exe'
78+
}
79+
if (project.name != 'integ-test-zip') {
80+
with modulesFiles
81+
} else {
82+
with transportModulesFiles
83+
}
84+
}
85+
}
86+
}

0 commit comments

Comments
 (0)