Skip to content

Commit ff62d14

Browse files
committed
Merge remote-tracking branch 'es/6.x' into ccr-6.x
* es/6.x: (155 commits) Make persistent tasks work. Made persistent tasks executors pluggable. Removed ClientHelper dependency from PersistentTasksService. Added AllocatedPersistentTask#waitForPersistentTaskStatus(...) that delegates to PersistentTasksService#waitForPersistentTaskStatus(...) Add adding ability to associate an ID with tasks. Remove InternalClient and InternalSecurityClient (#3054) Make the persistent task status available to PersistentTasksExecutor.nodeOperation(...) method Refactor/to x content fragments2 (#2329) Make AllocatedPersistentTask members volatile (#2297) Moves more classes over to ToXContentObject/Fragment (#2283) Adapt to upstream changes made to AbstractStreamableXContentTestCase (#2117) Move tribe to a module (#2088) Persistent Tasks: remove unused isCurrentStatus method (#2076) Call initialising constructor of BaseTasksRequest (#1771) Always Accumulate Transport Exceptions (#1619) Pass down the provided timeout. Fix static / version based BWC tests (#1456) Don't call ClusterService.state() in a ClusterStateUpdateTask Separate publishing from applying cluster states Persistent tasks: require allocation id on task completion (#1107) Fixes compile errors in Eclipse due to generics ...
2 parents 40b57c7 + 6a8adee commit ff62d14

File tree

498 files changed

+16721
-3747
lines changed

Some content is hidden

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

498 files changed

+16721
-3747
lines changed

Vagrantfile

Lines changed: 200 additions & 147 deletions
Large diffs are not rendered by default.

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ subprojects {
189189
"org.elasticsearch:elasticsearch:${version}": ':server',
190190
"org.elasticsearch:elasticsearch-cli:${version}": ':server:cli',
191191
"org.elasticsearch:elasticsearch-core:${version}": ':libs:elasticsearch-core',
192+
"org.elasticsearch:elasticsearch-secure-sm:${version}": ':libs:secure-sm',
192193
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
193194
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
194195
"org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}": ':client:rest-high-level',

buildSrc/src/main/groovy/com/carrotsearch/gradle/junit4/RandomizedTestingPlugin.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ class RandomizedTestingPlugin implements Plugin<Project> {
6262
RandomizedTestingTask newTestTask = tasks.create(properties)
6363
newTestTask.classpath = oldTestTask.classpath
6464
newTestTask.testClassesDir = oldTestTask.project.sourceSets.test.output.classesDir
65+
// since gradle 4.5, tasks immutable dependencies are "hidden" (do not show up in dependsOn)
66+
// so we must explicitly add a dependency on generating the test classpath
67+
newTestTask.dependsOn('testClasses')
6568

6669
// hack so check task depends on custom test
6770
Task checkTask = tasks.findByPath('check')

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,9 @@ class BuildPlugin implements Plugin<Project> {
567567
File heapdumpDir = new File(project.buildDir, 'heapdump')
568568
heapdumpDir.mkdirs()
569569
jvmArg '-XX:HeapDumpPath=' + heapdumpDir
570+
if (project.runtimeJavaVersion >= JavaVersion.VERSION_1_9) {
571+
jvmArg '--illegal-access=warn'
572+
}
570573
argLine System.getProperty('tests.jvm.argline')
571574

572575
// we use './temp' since this is per JVM and tests are forbidden from writing to CWD

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ class ClusterConfiguration {
123123
return tmpFile.exists()
124124
}
125125

126+
/**
127+
* The maximum number of seconds to wait for nodes to complete startup, which includes writing
128+
* the ports files for the transports and the pid file. This wait time occurs before the wait
129+
* condition is executed.
130+
*/
131+
@Input
132+
int nodeStartupWaitSeconds = 30
133+
126134
public ClusterConfiguration(Project project) {
127135
this.project = project
128136
}

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import org.elasticsearch.gradle.LoggedExec
2424
import org.elasticsearch.gradle.Version
2525
import org.elasticsearch.gradle.VersionProperties
2626
import org.elasticsearch.gradle.plugin.MetaPluginBuildPlugin
27-
import org.elasticsearch.gradle.plugin.MetaPluginPropertiesExtension
2827
import org.elasticsearch.gradle.plugin.PluginBuildPlugin
2928
import org.elasticsearch.gradle.plugin.PluginPropertiesExtension
3029
import org.gradle.api.AntBuilder
@@ -120,7 +119,7 @@ class ClusterFormationTasks {
120119
startTasks.add(configureNode(project, prefix, runner, dependsOn, node, config, distro, nodes.get(0)))
121120
}
122121

123-
Task wait = configureWaitTask("${prefix}#wait", project, nodes, startTasks)
122+
Task wait = configureWaitTask("${prefix}#wait", project, nodes, startTasks, config.nodeStartupWaitSeconds)
124123
runner.dependsOn(wait)
125124

126125
return nodes
@@ -581,10 +580,10 @@ class ClusterFormationTasks {
581580
return start
582581
}
583582

584-
static Task configureWaitTask(String name, Project project, List<NodeInfo> nodes, List<Task> startTasks) {
583+
static Task configureWaitTask(String name, Project project, List<NodeInfo> nodes, List<Task> startTasks, int waitSeconds) {
585584
Task wait = project.tasks.create(name: name, dependsOn: startTasks)
586585
wait.doLast {
587-
ant.waitfor(maxwait: '30', maxwaitunit: 'second', checkevery: '500', checkeveryunit: 'millisecond', timeoutproperty: "failed${name}") {
586+
ant.waitfor(maxwait: "${waitSeconds}", maxwaitunit: 'second', checkevery: '500', checkeveryunit: 'millisecond', timeoutproperty: "failed${name}") {
588587
or {
589588
for (NodeInfo node : nodes) {
590589
resourceexists {
@@ -614,6 +613,17 @@ class ClusterFormationTasks {
614613
waitFailed(project, nodes, logger, 'Failed to start elasticsearch')
615614
}
616615

616+
// make sure all files exist otherwise we haven't fully started up
617+
boolean missingFile = false
618+
for (NodeInfo node : nodes) {
619+
missingFile |= node.pidFile.exists() == false
620+
missingFile |= node.httpPortsFile.exists() == false
621+
missingFile |= node.transportPortsFile.exists() == false
622+
}
623+
if (missingFile) {
624+
waitFailed(project, nodes, logger, 'Elasticsearch did not complete startup in time allotted')
625+
}
626+
617627
// go through each node checking the wait condition
618628
for (NodeInfo node : nodes) {
619629
// first bind node info to the closure, then pass to the ant runner so we can get good logging

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public class RestIntegTestTask extends DefaultTask {
162162
if (line.startsWith("[")) {
163163
inExcerpt = false // clear with the next log message
164164
}
165-
if (line =~ /(\[WARN\])|(\[ERROR\])/) {
165+
if (line =~ /(\[WARN *\])|(\[ERROR *\])/) {
166166
inExcerpt = true // show warnings and errors
167167
}
168168
if (inStartup || inExcerpt) {

buildSrc/src/main/resources/forbidden/es-server-signatures.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,56 @@ org.joda.time.DateTime#<init>(int, int, int, int, int, int)
8282
org.joda.time.DateTime#<init>(int, int, int, int, int, int, int)
8383
org.joda.time.DateTime#now()
8484
org.joda.time.DateTimeZone#getDefault()
85+
86+
@defaultMessage Local times may be ambiguous or nonexistent in a specific time zones. Use ZoneRules#getValidOffsets() instead.
87+
java.time.LocalDateTime#atZone(java.time.ZoneId)
88+
java.time.ZonedDateTime#of(int, int, int, int, int, int, int, java.time.ZoneId)
89+
java.time.ZonedDateTime#of(java.time.LocalDate, java.time.LocalTime, java.time.ZoneId)
90+
java.time.ZonedDateTime#of(java.time.LocalDateTime, java.time.ZoneId)
91+
java.time.ZonedDateTime#truncatedTo(java.time.temporal.TemporalUnit)
92+
java.time.ZonedDateTime#of(int, int, int, int, int, int, int, java.time.ZoneId)
93+
java.time.ZonedDateTime#of(java.time.LocalDate, java.time.LocalTime, java.time.ZoneId)
94+
java.time.ZonedDateTime#of(java.time.LocalDateTime, java.time.ZoneId)
95+
java.time.ZonedDateTime#ofLocal(java.time.LocalDateTime, java.time.ZoneId, java.time.ZoneOffset)
96+
java.time.OffsetDateTime#atZoneSimilarLocal(java.time.ZoneId)
97+
java.time.zone.ZoneRules#getOffset(java.time.LocalDateTime)
98+
99+
@defaultMessage Manipulation of an OffsetDateTime may yield a time that is not valid in the desired time zone. Use ZonedDateTime instead.
100+
java.time.OffsetDateTime#minus(long, java.time.temporal.TemporalUnit)
101+
java.time.OffsetDateTime#minus(long, java.time.temporal.TemporalUnit)
102+
java.time.OffsetDateTime#minus(java.time.temporal.TemporalAmount)
103+
java.time.OffsetDateTime#minusDays(long)
104+
java.time.OffsetDateTime#minusHours(long)
105+
java.time.OffsetDateTime#minusMinutes(long)
106+
java.time.OffsetDateTime#minusMonths(long)
107+
java.time.OffsetDateTime#minusNanos(long)
108+
java.time.OffsetDateTime#minusSeconds(long)
109+
java.time.OffsetDateTime#minusWeeks(long)
110+
java.time.OffsetDateTime#minusYears(long)
111+
java.time.OffsetDateTime#plus(long, java.time.temporal.TemporalUnit)
112+
java.time.OffsetDateTime#plus(java.time.temporal.TemporalAmount)
113+
java.time.OffsetDateTime#plusDays(long)
114+
java.time.OffsetDateTime#plusHours(long)
115+
java.time.OffsetDateTime#plusMinutes(long)
116+
java.time.OffsetDateTime#plusMonths(long)
117+
java.time.OffsetDateTime#plusNanos(long)
118+
java.time.OffsetDateTime#plusSeconds(long)
119+
java.time.OffsetDateTime#plusWeeks(long)
120+
java.time.OffsetDateTime#plusYears(long)
121+
java.time.OffsetDateTime#with(java.time.temporal.TemporalAdjuster)
122+
java.time.OffsetDateTime#with(java.time.temporal.TemporalField, long)
123+
java.time.OffsetDateTime#withDayOfMonth(int)
124+
java.time.OffsetDateTime#withDayOfYear(int)
125+
java.time.OffsetDateTime#withHour(int)
126+
java.time.OffsetDateTime#withMinute(int)
127+
java.time.OffsetDateTime#withMonth(int)
128+
java.time.OffsetDateTime#withNano(int)
129+
java.time.OffsetDateTime#withOffsetSameInstant(java.time.ZoneOffset)
130+
java.time.OffsetDateTime#withOffsetSameLocal(java.time.ZoneOffset)
131+
java.time.OffsetDateTime#withSecond(int)
132+
java.time.OffsetDateTime#withYear(int)
133+
134+
@defaultMessage Daylight saving is not the only reason for a change in timezone offset.
135+
java.time.zone.ZoneRules#getStandardOffset(java.time.Instant)
136+
java.time.zone.ZoneRules#getDaylightSavings(java.time.Instant)
137+
java.time.zone.ZoneRules#isDaylightSavings(java.time.Instant)

0 commit comments

Comments
 (0)