Skip to content

Commit 1f5811b

Browse files
committed
Merge remote-tracking branch 'origin/master' into snapshot-lifecycle-management
2 parents 5b97fff + 0355bc1 commit 1f5811b

File tree

375 files changed

+13388
-4670
lines changed

Some content is hidden

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

375 files changed

+13388
-4670
lines changed

.ci/matrix-runtime-javas.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ES_RUNTIME_JAVA:
99
- java8
1010
- java8fips
1111
- java11
12+
- java12
1213
- openjdk12
1314
- zulu8
1415
- zulu11
16+
- zulu12

.ci/packer_cache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ export JAVA_HOME="${HOME}"/.java/${ES_BUILD_JAVA}
2020
# We are caching BWC versions too, need these so we can build those
2121
export JAVA8_HOME="${HOME}"/.java/java8
2222
export JAVA11_HOME="${HOME}"/.java/java11
23-
export JAVA12_HOME="${HOME}"/.java/java12
23+
export JAVA12_HOME="${HOME}"/.java/openjdk12
2424
./gradlew --parallel clean --scan -Porg.elasticsearch.acceptScanTOS=true -s resolveAllDependencies

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ task verifyVersions {
162162
* after the backport of the backcompat code is complete.
163163
*/
164164

165-
boolean bwc_tests_enabled = true
166-
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
165+
boolean bwc_tests_enabled = false
166+
final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/40319" /* place a PR link here when committing bwc changes */
167167
if (bwc_tests_enabled == false) {
168168
if (bwc_tests_disabled_issue.isEmpty()) {
169169
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class PluginBuildPlugin extends BuildPlugin {
4444
public void apply(Project project) {
4545
super.apply(project)
4646
configureDependencies(project)
47+
4748
// this afterEvaluate must happen before the afterEvaluate added by integTest creation,
4849
// so that the file name resolution for installing the plugin will be setup
4950
project.afterEvaluate {
@@ -69,7 +70,7 @@ public class PluginBuildPlugin extends BuildPlugin {
6970
if (isModule) {
7071
throw new RuntimeException("Testclusters does not support modules yet");
7172
} else {
72-
project.testClusters.integTestCluster.plugin(
73+
project.testClusters.integTest.plugin(
7374
project.file(project.tasks.bundlePlugin.archiveFile)
7475
)
7576
}

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public class RestIntegTestTask extends DefaultTask {
6262
clusterConfig = project.extensions.create("${name}Cluster", ClusterConfiguration.class, project)
6363
} else {
6464
project.testClusters {
65-
integTestCluster {
65+
"$name" {
6666
distribution = 'INTEG_TEST'
6767
version = project.version
6868
javaHome = project.file(project.ext.runtimeJavaHome)
6969
}
7070
}
71-
runner.useCluster project.testClusters.integTestCluster
71+
runner.useCluster project.testClusters."$name"
7272
}
7373

7474
// override/add more for rest tests
@@ -81,7 +81,7 @@ public class RestIntegTestTask extends DefaultTask {
8181
throw new IllegalArgumentException("tests.rest.cluster and tests.cluster must both be null or non-null")
8282
}
8383
if (usesTestclusters == true) {
84-
ElasticsearchNode node = project.testClusters.integTestCluster
84+
ElasticsearchNode node = project.testClusters."${name}"
8585
runner.systemProperty('tests.rest.cluster', {node.allHttpSocketURI.join(",") })
8686
runner.systemProperty('tests.config.dir', {node.getConfigDir()})
8787
runner.systemProperty('tests.cluster', {node.transportPortURI})
@@ -187,6 +187,10 @@ public class RestIntegTestTask extends DefaultTask {
187187
clusterInit.mustRunAfter(tasks)
188188
}
189189

190+
public void runner(Closure configure) {
191+
project.tasks.getByName("${name}Runner").configure(configure)
192+
}
193+
190194
/** Print out an excerpt of the log from the given node. */
191195
protected static void printLogExcerpt(NodeInfo nodeInfo) {
192196
File logFile = new File(nodeInfo.homeDir, "logs/${nodeInfo.clusterName}.log")

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

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class VagrantTestPlugin implements Plugin<Project> {
7878
private static final PACKAGING_TEST_CONFIGURATION = 'packagingTest'
7979
private static final BATS = 'bats'
8080
private static final String BATS_TEST_COMMAND ="cd \$PACKAGING_ARCHIVES && sudo bats --tap \$BATS_TESTS/*.$BATS"
81-
private static final String PLATFORM_TEST_COMMAND ="rm -rf ~/elasticsearch && rsync -r /elasticsearch/ ~/elasticsearch && cd ~/elasticsearch && ./gradlew test integTest"
8281

8382
/** Boxes that have been supplied and are available for testing **/
8483
List<String> availableBoxes = []
@@ -388,15 +387,6 @@ class VagrantTestPlugin implements Plugin<Project> {
388387
}
389388
}
390389

391-
private static void createPlatformTestTask(Project project) {
392-
project.tasks.create('platformTest') {
393-
group 'Verification'
394-
description "Test unit and integ tests on different platforms using vagrant. See TESTING.asciidoc for details. This test " +
395-
"is unmaintained."
396-
dependsOn 'vagrantCheckVersion'
397-
}
398-
}
399-
400390
private void createBoxListTasks(Project project) {
401391
project.tasks.create('listAllBoxes') {
402392
group 'Verification'
@@ -429,7 +419,6 @@ class VagrantTestPlugin implements Plugin<Project> {
429419
createSmokeTestTask(project)
430420
createPrepareVagrantTestEnvTask(project)
431421
createPackagingTestTask(project)
432-
createPlatformTestTask(project)
433422
createBoxListTasks(project)
434423
}
435424

@@ -454,9 +443,6 @@ class VagrantTestPlugin implements Plugin<Project> {
454443
assert project.tasks.packagingTest != null
455444
Task packagingTest = project.tasks.packagingTest
456445

457-
assert project.tasks.platformTest != null
458-
Task platformTest = project.tasks.platformTest
459-
460446
/*
461447
* We always use the main project.rootDir as Vagrant's current working directory (VAGRANT_CWD)
462448
* so that boxes are not duplicated for every Gradle project that use this VagrantTestPlugin.
@@ -610,31 +596,6 @@ class VagrantTestPlugin implements Plugin<Project> {
610596
packagingTest.dependsOn(javaPackagingTest)
611597
}
612598
}
613-
614-
/*
615-
* This test is unmaintained and was created to run on Linux. We won't allow it to run on Windows
616-
* until it's been brought back into maintenance
617-
*/
618-
if (LINUX_BOXES.contains(box)) {
619-
Task platform = project.tasks.create("vagrant${boxTask}#platformTest", VagrantCommandTask) {
620-
command 'ssh'
621-
boxName box
622-
environmentVars vagrantEnvVars
623-
dependsOn up
624-
finalizedBy halt
625-
args '--command', PLATFORM_TEST_COMMAND + " -Dtests.seed=${-> project.testSeed}"
626-
}
627-
TaskExecutionAdapter platformReproListener = createReproListener(project, platform.path)
628-
platform.doFirst {
629-
project.gradle.addListener(platformReproListener)
630-
}
631-
platform.doLast {
632-
project.gradle.removeListener(platformReproListener)
633-
}
634-
if (project.extensions.esvagrant.boxes.contains(box)) {
635-
platformTest.dependsOn(platform)
636-
}
637-
}
638599
}
639600
}
640601

0 commit comments

Comments
 (0)