Skip to content

Commit 8912627

Browse files
committed
Merge branch 'master' into license/remote
2 parents 2acd57c + 6e99cdc commit 8912627

File tree

10,601 files changed

+444049
-287463
lines changed

Some content is hidden

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

10,601 files changed

+444049
-287463
lines changed

.backportrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"upstream": "elastic/elasticsearch",
33
"targetBranchChoices": [
4-
{ "name": "master", "checked": true },
4+
"master",
5+
"8.0",
56
"7.16",
67
"7.15",
78
"7.14",
89
"6.8"
910
],
1011
"targetPRLabels": ["backport"],
1112
"branchLabelMapping": {
12-
"^v8.0.0$": "master",
13+
"^v8.1.0$": "master",
1314
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
1415
}
1516
}

.ci/bwcVersions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ BWC_VERSION:
4646
- "7.15.2"
4747
- "7.16.0"
4848
- "8.0.0"
49+
- "8.1.0"

.ci/java-versions.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# are 'java' or 'openjdk' followed by the major release number.
66

77
ES_BUILD_JAVA=openjdk16
8-
ES_RUNTIME_JAVA=java11
8+
ES_RUNTIME_JAVA=openjdk17

.ci/jobs.t/elastic+elasticsearch+pull-request+docs-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
3333
- shell: |
3434
#!/usr/local/bin/runbld --redirect-stderr
35-
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed :docs:check
35+
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed precommit :docs:check

.ci/jobs.t/elastic+elasticsearch+pull-request+precommit.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
github-hooks: true
1919
status-context: elasticsearch-ci/precommit
2020
cancel-builds-on-update: true
21-
included-regions:
22-
- ^docs/.*
23-
black-list-labels:
21+
white-list-labels:
2422
- '>test-mute'
2523
builders:
2624
- inject:

.ci/matrix-runtime-javas.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,4 @@
66
# or 'openjdk' followed by the major release number.
77

88
ES_RUNTIME_JAVA:
9-
- java11
10-
- openjdk16
11-
- zulu11
12-
- corretto11
13-
- adoptopenjdk11
149
- openjdk17

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@
1717

1818
# Format aggregations and related code (server and x-pack)
1919
d71544976608bdb53fa4d29521fb328e1033ee2f
20+
21+
# Reformatting of whole codebase
22+
12ad399c488f0cc60e19b5e1b29c6d569cb4351a

build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/precommit/FormattingPrecommitPlugin.java

Lines changed: 2 additions & 250 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void apply(Project project) {
6060
formatterConfigPath = "../" + formatterConfigPath;
6161
}
6262

63-
java.target(getTargets(project.getPath()));
63+
java.target("src/**/*.java");
6464

6565
// Use `@formatter:off` and `@formatter:on` to toggle formatting - ONLY IF STRICTLY NECESSARY
6666
java.toggleOffOn("@formatter:off", "@formatter:on");
@@ -83,259 +83,11 @@ public void apply(Project project) {
8383
}
8484
}
8585

86-
@SuppressWarnings("CheckStyle")
87-
private Object[] getTargets(String projectPath) {
88-
if (projectPath.equals(":server")) {
89-
return new String[] {
90-
"src/*/java/org/elasticsearch/action/admin/cluster/repositories/**/*.java",
91-
"src/*/java/org/elasticsearch/action/admin/cluster/snapshots/**/*.java",
92-
"src/test/java/org/elasticsearch/common/xcontent/support/XContentMapValuesTests.java",
93-
"src/*/java/org/elasticsearch/index/IndexMode.java",
94-
"src/*/java/org/elasticsearch/index/IndexRouting.java",
95-
"src/*/java/org/elasticsearch/index/TimeSeriesModeTests.java",
96-
"src/*/java/org/elasticsearch/index/snapshots/**/*.java",
97-
"src/*/java/org/elasticsearch/repositories/**/*.java",
98-
"src/*/java/org/elasticsearch/search/aggregations/**/*.java",
99-
"src/*/java/org/elasticsearch/snapshots/**/*.java" };
100-
} else if (projectPath.equals(":test:framework")) {
101-
return new String[] {
102-
"src/test/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java",
103-
};
104-
} else {
105-
// Normally this isn"t necessary, but we have Java sources in
106-
// non-standard places
107-
return new String[] { "src/**/*.java" };
108-
}
109-
}
110-
11186
// Do not add new sub-projects here!
11287
private static final List<String> PROJECT_PATHS_TO_EXCLUDE = List.of(
113-
":client:benchmark",
114-
":client:client-benchmark-noop-api-plugin",
115-
":client:rest",
116-
":client:rest-high-level",
117-
":client:rest-high-level:qa:ssl-enabled",
118-
":client:sniffer",
119-
":client:test",
120-
":distribution:archives:integ-test-zip",
12188
":distribution:bwc:bugfix",
12289
":distribution:bwc:maintenance",
12390
":distribution:bwc:minor",
124-
":distribution:bwc:staged",
125-
":distribution:docker",
126-
":docs",
127-
":example-plugins:custom-settings",
128-
":example-plugins:custom-significance-heuristic",
129-
":example-plugins:custom-suggester",
130-
":example-plugins:painless-whitelist",
131-
":example-plugins:rescore",
132-
":example-plugins:rest-handler",
133-
":example-plugins:script-expert-scoring",
134-
":example-plugins:security-authorization-engine",
135-
":libs:elasticsearch-cli",
136-
":libs:elasticsearch-core",
137-
":libs:elasticsearch-dissect",
138-
":libs:elasticsearch-geo",
139-
":libs:elasticsearch-grok",
140-
":libs:elasticsearch-lz4",
141-
":libs:elasticsearch-nio",
142-
":libs:elasticsearch-plugin-classloader",
143-
":libs:elasticsearch-secure-sm",
144-
":libs:elasticsearch-ssl-config",
145-
":libs:elasticsearch-x-content",
146-
":modules:analysis-common",
147-
":modules:ingest-common",
148-
":modules:ingest-geoip",
149-
":modules:ingest-geoip:qa:file-based-update",
150-
":modules:ingest-user-agent",
151-
":modules:lang-expression",
152-
":modules:lang-mustache",
153-
":modules:lang-painless",
154-
":modules:lang-painless:spi",
155-
":modules:mapper-extras",
156-
":modules:parent-join",
157-
":modules:percolator",
158-
":modules:rank-eval",
159-
":modules:reindex",
160-
":modules:repository-url",
161-
":modules:systemd",
162-
":modules:tasks",
163-
":modules:transport-netty4",
164-
":plugins:analysis-icu",
165-
":plugins:analysis-kuromoji",
166-
":plugins:analysis-nori",
167-
":plugins:analysis-phonetic",
168-
":plugins:analysis-smartcn",
169-
":plugins:analysis-stempel",
170-
":plugins:analysis-ukrainian",
171-
":plugins:discovery-azure-classic",
172-
":plugins:discovery-ec2",
173-
":plugins:discovery-ec2:qa:amazon-ec2",
174-
":plugins:discovery-gce",
175-
":plugins:discovery-gce:qa:gce",
176-
":plugins:ingest-attachment",
177-
":plugins:mapper-annotated-text",
178-
":plugins:mapper-murmur3",
179-
":plugins:mapper-size",
180-
":plugins:repository-azure",
181-
":plugins:repository-gcs",
182-
":plugins:repository-hdfs",
183-
":plugins:repository-hdfs:hadoop-common",
184-
":plugins:repository-s3",
185-
":plugins:store-smb",
186-
":plugins:transport-nio",
187-
":qa:ccs-rolling-upgrade-remote-cluster",
188-
":qa:ccs-unavailable-clusters",
189-
":qa:die-with-dignity",
190-
":qa:evil-tests",
191-
":qa:full-cluster-restart",
192-
":qa:logging-config",
193-
":qa:mixed-cluster",
194-
":qa:multi-cluster-search",
195-
":qa:no-bootstrap-tests",
196-
":qa:remote-clusters",
197-
":qa:repository-multi-version",
198-
":qa:rolling-upgrade",
199-
":qa:smoke-test-http",
200-
":qa:smoke-test-ingest-with-all-dependencies",
201-
":qa:smoke-test-multinode",
202-
":qa:smoke-test-plugins",
203-
":qa:snapshot-based-recoveries",
204-
":qa:snapshot-based-recoveries:azure",
205-
":qa:snapshot-based-recoveries:fs",
206-
":qa:snapshot-based-recoveries:gcs",
207-
":qa:snapshot-based-recoveries:s3",
208-
":qa:verify-version-constants",
209-
":rest-api-spec",
210-
":test:fixtures:geoip-fixture",
211-
":test:fixtures:krb5kdc-fixture",
212-
":test:fixtures:old-elasticsearch",
213-
":test:logger-usage",
214-
":x-pack:docs",
215-
":x-pack:license-tools",
216-
":x-pack:plugin",
217-
":x-pack:plugin:async-search",
218-
":x-pack:plugin:async-search:qa",
219-
":x-pack:plugin:async-search:qa:security",
220-
":x-pack:plugin:autoscaling:qa:rest",
221-
":x-pack:plugin:ccr",
222-
":x-pack:plugin:ccr:qa",
223-
":x-pack:plugin:ccr:qa:downgrade-to-basic-license",
224-
":x-pack:plugin:ccr:qa:multi-cluster",
225-
":x-pack:plugin:ccr:qa:non-compliant-license",
226-
":x-pack:plugin:ccr:qa:rest",
227-
":x-pack:plugin:ccr:qa:restart",
228-
":x-pack:plugin:ccr:qa:security",
229-
":x-pack:plugin:core",
230-
":x-pack:plugin:data-streams:qa:multi-node",
231-
":x-pack:plugin:data-streams:qa:rest",
232-
":x-pack:plugin:deprecation",
233-
":x-pack:plugin:enrich:qa:common",
234-
":x-pack:plugin:enrich:qa:rest",
235-
":x-pack:plugin:enrich:qa:rest-with-advanced-security",
236-
":x-pack:plugin:enrich:qa:rest-with-security",
237-
":x-pack:plugin:eql",
238-
":x-pack:plugin:eql:qa",
239-
":x-pack:plugin:eql:qa:common",
240-
":x-pack:plugin:eql:qa:mixed-node",
241-
":x-pack:plugin:eql:qa:multi-cluster-with-security",
242-
":x-pack:plugin:eql:qa:rest",
243-
":x-pack:plugin:eql:qa:security",
244-
":x-pack:plugin:fleet:qa:rest",
245-
":x-pack:plugin:graph",
246-
":x-pack:plugin:graph:qa:with-security",
247-
":x-pack:plugin:identity-provider",
248-
":x-pack:plugin:identity-provider:qa:idp-rest-tests",
249-
":x-pack:plugin:ilm",
250-
":x-pack:plugin:ilm:qa:multi-cluster",
251-
":x-pack:plugin:ilm:qa:multi-node",
252-
":x-pack:plugin:ilm:qa:rest",
253-
":x-pack:plugin:ilm:qa:with-security",
254-
":x-pack:plugin:mapper-constant-keyword",
255-
":x-pack:plugin:mapper-flattened",
256-
":x-pack:plugin:ml",
257-
":x-pack:plugin:ml:qa:basic-multi-node",
258-
":x-pack:plugin:ml:qa:disabled",
259-
":x-pack:plugin:ml:qa:ml-with-security",
260-
":x-pack:plugin:ml:qa:native-multi-node-tests",
261-
":x-pack:plugin:ml:qa:no-bootstrap-tests",
262-
":x-pack:plugin:ml:qa:single-node-tests",
263-
":x-pack:plugin:monitoring",
264-
":x-pack:plugin:ql",
265-
":x-pack:plugin:repository-encrypted:qa:azure",
266-
":x-pack:plugin:repository-encrypted:qa:gcs",
267-
":x-pack:plugin:repository-encrypted:qa:s3",
268-
":x-pack:plugin:rollup:qa:rest",
269-
":x-pack:plugin:search-business-rules",
270-
":x-pack:plugin:searchable-snapshots:qa:rest",
271-
":x-pack:plugin:security",
272-
":x-pack:plugin:security:cli",
273-
":x-pack:plugin:security:qa:basic-enable-security",
274-
":x-pack:plugin:security:qa:security-basic",
275-
":x-pack:plugin:security:qa:security-disabled",
276-
":x-pack:plugin:security:qa:security-not-enabled",
277-
":x-pack:plugin:security:qa:security-trial",
278-
":x-pack:plugin:security:qa:service-account",
279-
":x-pack:plugin:security:qa:smoke-test-all-realms",
280-
":x-pack:plugin:security:qa:tls-basic",
281-
":x-pack:plugin:shutdown:qa:multi-node",
282-
":x-pack:plugin:snapshot-repo-test-kit:qa:rest",
283-
":x-pack:plugin:spatial",
284-
":x-pack:plugin:sql",
285-
":x-pack:plugin:sql:jdbc",
286-
":x-pack:plugin:sql:qa",
287-
":x-pack:plugin:sql:qa:jdbc",
288-
":x-pack:plugin:sql:qa:jdbc:security",
289-
":x-pack:plugin:sql:qa:mixed-node",
290-
":x-pack:plugin:sql:qa:security",
291-
":x-pack:plugin:sql:qa:server:multi-node",
292-
":x-pack:plugin:sql:qa:server:single-node",
293-
":x-pack:plugin:sql:sql-action",
294-
":x-pack:plugin:sql:sql-cli",
295-
":x-pack:plugin:sql:sql-client",
296-
":x-pack:plugin:sql:sql-proto",
297-
":x-pack:plugin:stack:qa:rest",
298-
":x-pack:plugin:text-structure:qa:text-structure-with-security",
299-
":x-pack:plugin:transform",
300-
":x-pack:plugin:transform:qa:multi-cluster-tests-with-security",
301-
":x-pack:plugin:transform:qa:multi-node-tests",
302-
":x-pack:plugin:transform:qa:single-node-tests",
303-
":x-pack:plugin:vector-tile:qa:multi-cluster",
304-
":x-pack:plugin:vectors",
305-
":x-pack:plugin:watcher",
306-
":x-pack:plugin:watcher:qa:rest",
307-
":x-pack:plugin:watcher:qa:with-monitoring",
308-
":x-pack:plugin:watcher:qa:with-security",
309-
":x-pack:plugin:wildcard",
310-
":x-pack:qa",
311-
":x-pack:qa:core-rest-tests-with-security",
312-
":x-pack:qa:evil-tests",
313-
":x-pack:qa:full-cluster-restart",
314-
":x-pack:qa:kerberos-tests",
315-
":x-pack:qa:mixed-tier-cluster",
316-
":x-pack:qa:multi-cluster-search-security",
317-
":x-pack:qa:multi-node",
318-
":x-pack:qa:oidc-op-tests",
319-
":x-pack:qa:openldap-tests",
320-
":x-pack:qa:password-protected-keystore",
321-
":x-pack:qa:reindex-tests-with-security",
322-
":x-pack:qa:rolling-upgrade",
323-
":x-pack:qa:rolling-upgrade-multi-cluster",
324-
":x-pack:qa:runtime-fields:core-with-mapped",
325-
":x-pack:qa:runtime-fields:core-with-search",
326-
":x-pack:qa:runtime-fields:with-security",
327-
":x-pack:qa:saml-idp-tests",
328-
":x-pack:qa:security-example-spi-extension",
329-
":x-pack:qa:security-setup-password-tests",
330-
":x-pack:qa:security-tools-tests",
331-
":x-pack:qa:smoke-test-plugins",
332-
":x-pack:qa:smoke-test-plugins-ssl",
333-
":x-pack:qa:smoke-test-security-with-mustache",
334-
":x-pack:qa:third-party:active-directory",
335-
":x-pack:qa:third-party:jira",
336-
":x-pack:qa:third-party:pagerduty",
337-
":x-pack:qa:third-party:slack",
338-
":x-pack:test:idp-fixture",
339-
":x-pack:test:smb-fixture"
91+
":distribution:bwc:staged"
34092
);
34193
}

build-tools-internal/src/main/groovy/elasticsearch.runtime-jdk-provision.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,12 @@ configure(allprojects) {
3333
test.executable = rootProject.jdks.provisioned_runtime.getBinJavaPath()
3434
}
3535
}
36+
project.plugins.withId("elasticsearch.testclusters") { testClustersPlugin ->
37+
project.plugins.withId("elasticsearch.internal-testclusters") { internalPlugin ->
38+
if (BuildParams.getIsRuntimeJavaHomeSet() == false) {
39+
// If no runtime java home is set, use the bundled JDK for test clusters
40+
testClustersPlugin.setRuntimeJava(providers.provider(() -> file("${rootProject.jdks.provisioned_runtime.javaHomePath}")))
41+
}
42+
}
43+
}
3644
}

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/info/GlobalBuildInfoPlugin.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,23 @@ public void apply(Project project) {
8686
JavaVersion minimumRuntimeVersion = JavaVersion.toVersion(getResourceContents("/minimumRuntimeVersion"));
8787

8888
File runtimeJavaHome = findRuntimeJavaHome();
89+
boolean isRuntimeJavaHomeSet = Jvm.current().getJavaHome().equals(runtimeJavaHome) == false;
8990

9091
File rootDir = project.getRootDir();
9192
GitInfo gitInfo = GitInfo.gitInfo(rootDir);
9293

9394
BuildParams.init(params -> {
9495
params.reset();
9596
params.setRuntimeJavaHome(runtimeJavaHome);
96-
params.setRuntimeJavaVersion(determineJavaVersion("runtime java.home", runtimeJavaHome, minimumRuntimeVersion));
97-
params.setIsRuntimeJavaHomeSet(Jvm.current().getJavaHome().equals(runtimeJavaHome) == false);
97+
// TODO: Temporarily hard-code this to 17 until we upgrade to Gradle 7.3 and bump minimumRuntimeVersion
98+
params.setRuntimeJavaVersion(
99+
determineJavaVersion(
100+
"runtime java.home",
101+
runtimeJavaHome,
102+
isRuntimeJavaHomeSet ? JavaVersion.VERSION_17 : Jvm.current().getJavaVersion()
103+
)
104+
);
105+
params.setIsRuntimeJavaHomeSet(isRuntimeJavaHomeSet);
98106
JvmInstallationMetadata runtimeJdkMetaData = metadataDetector.getMetadata(getJavaInstallation(runtimeJavaHome).getLocation());
99107
params.setRuntimeJavaDetails(formatJavaVendorDetails(runtimeJdkMetaData));
100108
params.setJavaVersions(getAvailableJavaVersions());

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/rest/compat/YamlRestCompatTestPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public void apply(Project project) {
149149
task.setDestinationDir(project.getLayout().getBuildDirectory().dir("bundledCompatApis").get().getAsFile());
150150
task.setIncludeEmptyDirs(false);
151151
task.from(copyCompatYamlSpecTask.flatMap(t -> t.getOutputResourceDir().map(d -> d.dir(RELATIVE_API_PATH.toString()))));
152-
task.from(yamlCompatTestSourceSet.getResources(), s -> {
152+
task.from(yamlCompatTestSourceSet.getProcessResourcesTaskName(), s -> {
153153
s.include(RELATIVE_API_PATH + "/*");
154154
s.eachFile(
155155
details -> details.setRelativePath(

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/DistroTestPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
* This class defines gradle tasks for testing our various distribution artifacts.
7070
*/
7171
public class DistroTestPlugin implements Plugin<Project> {
72-
private static final String SYSTEM_JDK_VERSION = "11.0.2+9";
73-
private static final String SYSTEM_JDK_VENDOR = "openjdk";
72+
private static final String SYSTEM_JDK_VERSION = "17+35";
73+
private static final String SYSTEM_JDK_VENDOR = "adoptium";
7474
private static final String GRADLE_JDK_VERSION = "16.0.2+7";
7575
private static final String GRADLE_JDK_VENDOR = "adoptium";
7676

build-tools-internal/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
elasticsearch = 8.0.0
1+
elasticsearch = 8.1.0
22
lucene = 9.0.0-snapshot-2719cf6630e
33

44
bundled_jdk_vendor = adoptium

0 commit comments

Comments
 (0)