Skip to content

Commit f1b0991

Browse files
committed
Merge branch 'master' into feature/searchable-snapshots
2 parents 229b953 + 0582bb4 commit f1b0991

File tree

368 files changed

+3928
-2676
lines changed

Some content is hidden

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

368 files changed

+3928
-2676
lines changed

.ci/dockerOnLinuxExclusions

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
# Docker tests to be skipped on that OS. If /etc/os-release doesn't exist
55
# (as is the case on centos-6, for example) then that OS will again be
66
# excluded.
7-
centos-6
87
debian-8
98
opensuse-15-1
10-
ol-6.10
119
ol-7.7
1210
sles-12

README.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ In order to play with the distributed nature of Elasticsearch, simply bring more
192192

193193
=== Where to go from here?
194194

195-
We have just covered a very small portion of what Elasticsearch is all about. For more information, please refer to the http://www.elastic.co/products/elasticsearch[elastic.co] website. General questions can be asked on the https://discuss.elastic.co[Elastic Forum] or https://ela.st/slack[on Slack]. The Elasticsearch GitHub repository is reserved for bug reports and feature requests only.
195+
We have just covered a very small portion of what Elasticsearch is all about. For more information, please refer to the https://www.elastic.co/products/elasticsearch[elastic.co] website. General questions can be asked on the https://discuss.elastic.co[Elastic Forum] or https://ela.st/slack[on Slack]. The Elasticsearch GitHub repository is reserved for bug reports and feature requests only.
196196

197197
=== Building from Source
198198

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ subprojects {
8484

8585
Node developer = node.appendNode('developers').appendNode('developer')
8686
developer.appendNode('name', 'Elastic')
87-
developer.appendNode('url', 'http://www.elastic.co')
87+
developer.appendNode('url', 'https://www.elastic.co')
8888
}
8989
}
9090
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ import org.elasticsearch.gradle.LoggedExec
2525
import org.gradle.api.GradleException
2626
import org.gradle.api.Task
2727
import org.gradle.api.tasks.Exec
28-
import org.gradle.api.tasks.Input
2928
import org.gradle.api.tasks.Internal
30-
3129
/**
3230
* A fixture for integration tests which runs in a separate process launched by Ant.
3331
*/

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void apply(Project project) {
110110

111111
TaskProvider<Task> destructiveDistroTest = project.getTasks().register("destructiveDistroTest");
112112
for (ElasticsearchDistribution distribution : distributions) {
113-
if (distribution.getType() != Type.DOCKER || runDockerTests == true) {
113+
if (distribution.getType() != Type.DOCKER || runDockerTests) {
114114
TaskProvider<?> destructiveTask = configureDistroTest(project, distribution);
115115
destructiveDistroTest.configure(t -> t.dependsOn(destructiveTask));
116116
}
@@ -153,7 +153,7 @@ public void apply(Project project) {
153153
//
154154
// The shouldTestDocker property could be null, hence we use Boolean.TRUE.equals()
155155
boolean shouldExecute = distribution.getType() != Type.DOCKER
156-
|| Boolean.TRUE.equals(vmProject.findProperty("shouldTestDocker")) == true;
156+
|| Boolean.TRUE.equals(vmProject.findProperty("shouldTestDocker"));
157157

158158
if (shouldExecute) {
159159
t.dependsOn(vmTask);

buildSrc/src/main/java/org/elasticsearch/gradle/tool/DockerUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@ private static DockerAvailability getDockerAvailability(Project project) {
5353
// Since we use a multi-stage Docker build, check the Docker version since 17.05
5454
lastResult = runCommand(project, dockerPath, "version", "--format", "{{.Server.Version}}");
5555

56-
if (lastResult.isSuccess() == true) {
56+
if (lastResult.isSuccess()) {
5757
version = Version.fromString(lastResult.stdout.trim(), Version.Mode.RELAXED);
5858

5959
isVersionHighEnough = version.onOrAfter("17.05.0");
6060

61-
if (isVersionHighEnough == true) {
61+
if (isVersionHighEnough) {
6262
// Check that we can execute a privileged command
6363
lastResult = runCommand(project, dockerPath, "images");
6464
}
6565
}
6666
}
6767

68-
boolean isAvailable = isVersionHighEnough && lastResult.isSuccess() == true;
68+
boolean isAvailable = isVersionHighEnough && lastResult.isSuccess();
6969

7070
return new DockerAvailability(isAvailable, isVersionHighEnough, dockerPath, version, lastResult);
7171
}
@@ -125,7 +125,7 @@ private static class DockerAvailability {
125125
public static void assertDockerIsAvailable(Project project, List<String> tasks) {
126126
DockerAvailability availability = getDockerAvailability(project);
127127

128-
if (availability.isAvailable == true) {
128+
if (availability.isAvailable) {
129129
return;
130130
}
131131

buildSrc/src/minimumRuntime/java/org/elasticsearch/gradle/Version.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ public enum Mode {
2929
RELAXED
3030
}
3131

32-
private static final Pattern pattern = Pattern.compile("(\\d)+\\.(\\d+)\\.(\\d+)(-alpha\\d+|-beta\\d+|-rc\\d+)?(-SNAPSHOT)?");
32+
private static final Pattern pattern = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(-alpha\\d+|-beta\\d+|-rc\\d+)?(-SNAPSHOT)?");
3333

34-
private static final Pattern relaxedPattern = Pattern.compile("(\\d)+\\.(\\d+)\\.(\\d+)(-[a-zA-Z0-9_]+)*?");
34+
private static final Pattern relaxedPattern = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(-[a-zA-Z0-9_]+)*?");
3535

3636
public Version(int major, int minor, int revision) {
3737
Objects.requireNonNull(major, "major version can't be null");
@@ -60,7 +60,7 @@ public static Version fromString(final String s, final Mode mode) {
6060
Objects.requireNonNull(s);
6161
Matcher matcher = mode == Mode.STRICT ? pattern.matcher(s) : relaxedPattern.matcher(s);
6262
if (matcher.matches() == false) {
63-
String expected = mode == Mode.STRICT == true
63+
String expected = mode == Mode.STRICT
6464
? "major.minor.revision[-(alpha|beta|rc)Number][-SNAPSHOT]"
6565
: "major.minor.revision[-extra]";
6666
throw new IllegalArgumentException("Invalid version format: '" + s + "'. Should be " + expected);

buildSrc/src/test/java/org/elasticsearch/gradle/VersionTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public void testVersionParsing() {
3838
assertVersionEquals("5.1.2-rc3", 5, 1, 2);
3939
assertVersionEquals("6.1.2-SNAPSHOT", 6, 1, 2);
4040
assertVersionEquals("6.1.2-beta1-SNAPSHOT", 6, 1, 2);
41+
assertVersionEquals("17.03.11", 17, 3, 11);
4142
}
4243

4344
public void testRelaxedVersionParsing() {
@@ -46,6 +47,7 @@ public void testRelaxedVersionParsing() {
4647
assertVersionEquals("6.1.2-beta1-SNAPSHOT", 6, 1, 2, Version.Mode.RELAXED);
4748
assertVersionEquals("6.1.2-foo", 6, 1, 2, Version.Mode.RELAXED);
4849
assertVersionEquals("6.1.2-foo-bar", 6, 1, 2, Version.Mode.RELAXED);
50+
assertVersionEquals("16.01.22", 16, 1, 22, Version.Mode.RELAXED);
4951
}
5052

5153
public void testCompareWithStringVersions() {
@@ -91,6 +93,7 @@ public void testToString() {
9193

9294
public void testCompareVersions() {
9395
assertEquals(0, new Version(7, 0, 0).compareTo(new Version(7, 0, 0)));
96+
assertOrder(Version.fromString("19.0.1"), Version.fromString("20.0.3"));
9497
}
9598

9699
public void testExceptionEmpty() {

buildSrc/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ slf4j = 1.6.2
2222
# when updating the JNA version, also update the version in buildSrc/build.gradle
2323
jna = 4.5.1
2424

25-
netty = 4.1.43.Final
25+
netty = 4.1.45.Final
2626
joda = 2.10.4
2727

2828
# when updating this version, you need to ensure compatibility with:

0 commit comments

Comments
 (0)