Skip to content

Commit 144e0f4

Browse files
committed
Merge branch 'master' into 2019-10-23-handle-negative-free-space
2 parents eaa7bab + af59a67 commit 144e0f4

File tree

270 files changed

+5141
-3586
lines changed

Some content is hidden

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

270 files changed

+5141
-3586
lines changed

.ci/os.ps1

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent
55
exit
66
}
77

8-
# CI configures these, uncoment if running manually
9-
#
10-
# $env:ES_BUILD_JAVA="java12"
11-
#$env:ES_RUNTIME_JAVA="java11"
8+
$AppProps = ConvertFrom-StringData (Get-Content .ci/java-versions.properties -raw)
9+
$env:ES_BUILD_JAVA=$AppProps.ES_BUILD_JAVA
10+
$env:ES_RUNTIME_JAVA=$AppProps.ES_RUNTIME_JAVA
1211

1312
$ErrorActionPreference="Stop"
1413
$gradleInit = "C:\Users\$env:username\.gradle\init.d\"
@@ -27,10 +26,6 @@ New-Item -ItemType directory -Path \tmp
2726

2827
$ErrorActionPreference="Continue"
2928
# TODO: remove the task exclusions once dependencies are set correctly and these don't run for Windows or buldiung the deb on windows is fixed
30-
& .\gradlew.bat -g "C:\Users\$env:username\.gradle" --parallel --scan --console=plain destructiveDistroTest `
31-
-x :distribution:packages:buildOssDeb `
32-
-x :distribution:packages:buildDeb `
33-
-x :distribution:packages:buildOssRpm `
34-
-x :distribution:packages:buildRpm `
29+
& .\gradlew.bat -g "C:\Users\$env:username\.gradle" --parallel --scan --console=plain destructiveDistroTest
3530

3631
exit $LastExitCode

TESTING.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ supports a remote debugging option:
4343
./gradlew run --debug-jvm
4444
---------------------------------------------------------------------------
4545

46+
This will instruct all JVMs (including any that run cli tools such as creating the keyring or adding users)
47+
to suspend and initiate a debug connection on port incrementing from `5005`.
48+
As such the IDE needs to be instructed to listen for connections on this port.
49+
Since we might run multiple JVMs as part of configuring and starting the cluster it's
50+
recommended to have the option to aut restart checked.
51+
4652
==== Distribution
4753

4854
By default a node is started with the zip distribution.

buildSrc/reaper/src/main/java/org/elasticsearch/gradle/reaper/Reaper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Since how to reap a given service is platform and service dependent, this tool
3838
* operates on system commands to execute. It takes a single argument, a directory
3939
* that will contain files with reaping commands. Each line in each file will be
40-
* executed with {@link Runtime#getRuntime()#exec}.
40+
* executed with {@link Runtime#exec(String)}.
4141
*
4242
* The main method will wait indefinitely on the parent process (Gradle) by
4343
* reading from stdin. When Gradle shuts down, whether normally or abruptly, the

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,10 @@ class BuildPlugin implements Plugin<Project> {
676676
*/
677677
(javadoc.options as CoreJavadocOptions).addBooleanOption('html5', true)
678678
}
679+
// ensure javadoc task is run with 'check'
680+
project.pluginManager.withPlugin('lifecycle-base') {
681+
project.tasks.getByName(LifecycleBasePlugin.CHECK_TASK_NAME).dependsOn(project.tasks.withType(Javadoc))
682+
}
679683
configureJavadocJar(project)
680684
}
681685

@@ -857,6 +861,9 @@ class BuildPlugin implements Plugin<Project> {
857861
'tests.security.manager': 'true',
858862
'jna.nosys': 'true'
859863

864+
//TODO remove once jvm.options are added to test system properties
865+
test.systemProperty ('java.locale.providers','SPI,COMPAT')
866+
860867
// ignore changing test seed when build is passed -Dignore.tests.seed for cacheability experimentation
861868
if (System.getProperty('ignore.tests.seed') != null) {
862869
nonInputProperties.systemProperty('tests.seed', project.property('testSeed'))
@@ -889,7 +896,6 @@ class BuildPlugin implements Plugin<Project> {
889896
test.systemProperty('io.netty.noUnsafe', 'true')
890897
test.systemProperty('io.netty.noKeySetOptimization', 'true')
891898
test.systemProperty('io.netty.recycler.maxCapacityPerThread', '0')
892-
test.systemProperty('io.netty.allocator.numDirectArenas', '0')
893899

894900
test.testLogging { TestLoggingContainer logging ->
895901
logging.showExceptions = true

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/DistroTestPlugin.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import java.util.Map;
6060
import java.util.Random;
6161
import java.util.stream.Collectors;
62+
import java.util.stream.Stream;
6263

6364
import static org.elasticsearch.gradle.vagrant.VagrantMachine.convertLinuxPath;
6465
import static org.elasticsearch.gradle.vagrant.VagrantMachine.convertWindowsPath;
@@ -187,6 +188,12 @@ private static List<Object> configureVM(Project project) {
187188
vagrant.setBox(box);
188189
vagrant.vmEnv("SYSTEM_JAVA_HOME", convertPath(project, vagrant, systemJdk, "", ""));
189190
vagrant.vmEnv("PATH", convertPath(project, vagrant, gradleJdk, "/bin:$PATH", "\\bin;$Env:PATH"));
191+
// pass these along to get correct build scans
192+
if (System.getenv("JENKINS_URL") != null) {
193+
Stream.of("JOB_NAME", "JENKINS_URL", "BUILD_NUMBER", "BUILD_URL").forEach(name ->
194+
vagrant.vmEnv(name, System.getenv(name))
195+
);
196+
}
190197
vagrant.setIsWindowsVM(isWindows(project));
191198

192199
return Arrays.asList(systemJdk, gradleJdk);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import org.elasticsearch.gradle.testclusters.RestTestRunnerTask
2424
import org.elasticsearch.gradle.tool.Boilerplate
2525
import org.elasticsearch.gradle.tool.ClasspathUtils
2626
import org.gradle.api.DefaultTask
27+
import org.gradle.api.JavaVersion
2728
import org.gradle.api.Task
2829
import org.gradle.api.file.FileCopyDetails
2930
import org.gradle.api.tasks.Copy

buildSrc/src/main/java/org/elasticsearch/gradle/precommit/JarHellTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public JarHellTask() {
4242
@TaskAction
4343
public void runJarHellCheck() {
4444
LoggedExec.javaexec(getProject(), spec -> {
45-
spec.classpath(getClasspath());
45+
spec.environment("CLASSPATH", getClasspath().getAsPath());
4646
spec.setMain("org.elasticsearch.bootstrap.JarHell");
4747
});
4848
}

buildSrc/src/main/java/org/elasticsearch/gradle/test/GradleDistroTestTask.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ private List<String> getScript(boolean isWindows) {
8080
line.append(" --project-cache-dir ");
8181
line.append(isWindows ? convertWindowsPath(getProject(), cacheDir) : convertLinuxPath(getProject(), cacheDir));
8282
line.append(" -S");
83+
line.append(" --parallel");
8384
line.append(" -D'org.gradle.logging.level'=" + getProject().getGradle().getStartParameter().getLogLevel());
8485
if (testClass != null) {
8586
line.append(" --tests=");

buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/RunTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public Boolean getDebug() {
3636

3737
@Override
3838
public void beforeStart() {
39-
int debugPort = 8000;
39+
int debugPort = 5005;
4040
int httpPort = 9200;
4141
int transportPort = 9300;
4242
Map<String, String> additionalSettings = System.getProperties().entrySet().stream()
@@ -57,7 +57,7 @@ public void beforeStart() {
5757
"Running elasticsearch in debug mode, {} suspending until connected on debugPort {}",
5858
node, debugPort
5959
);
60-
node.jvmArgs("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=" + debugPort);
60+
node.jvmArgs("-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=" + debugPort);
6161
debugPort += 1;
6262
}
6363
}

client/rest-high-level/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,11 @@ testClusters.integTest {
129129

130130
setting 'indices.lifecycle.poll_interval', '1000ms'
131131
keystore 'xpack.security.transport.ssl.truststore.secure_password', 'testnode'
132+
extraConfigFile 'roles.yml', file('roles.yml')
132133
user username: System.getProperty('tests.rest.cluster.username', 'test_user'),
133-
password: System.getProperty('tests.rest.cluster.password', 'test-password')
134+
password: System.getProperty('tests.rest.cluster.password', 'test-password'),
135+
role: System.getProperty('tests.rest.cluster.role', 'admin')
136+
user username: 'admin_user', password: 'admin-password'
134137

135138
extraConfigFile nodeCert.name, nodeCert
136139
extraConfigFile nodeTrustStore.name, nodeTrustStore

0 commit comments

Comments
 (0)