Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cea8df9
Add 7.1 version constant to 7.x branch
jasontedor Feb 6, 2019
785aabb
Fix incorrect handling of version collections
alpar-t Feb 6, 2019
8881794
Fix bwcBuilds for versions newer than 7.0.0
alpar-t Feb 6, 2019
09ca07e
move old versions to unreleased
dnhatn Feb 6, 2019
d1d136d
Fix imports
jasontedor Feb 6, 2019
43383de
Remove bogus assertion
jasontedor Feb 6, 2019
22eeb0c
Use typeless APIs
jasontedor Feb 6, 2019
c168cef
Revert "Use typeless APIs"
jasontedor Feb 7, 2019
24a41a2
Some full cluster restart tests passing
jasontedor Feb 7, 2019
573eb52
More fixes
jasontedor Feb 7, 2019
a69e104
Fixes for rolling upgrade
alpar-t Feb 7, 2019
f3193c6
Fix full cluster restart tests
alpar-t Feb 7, 2019
f775747
Revert unintentional docker change
alpar-t Feb 7, 2019
68beb68
Refresh before getting doc count
DaveCTurner Feb 7, 2019
c36e84f
Fix method
jasontedor Feb 7, 2019
01f396c
Fix x-pack full cluster restart
alpar-t Feb 7, 2019
56af70b
Completly fix x-pack full cluster restart
alpar-t Feb 7, 2019
df711bd
Fix watcher tests
jkakavas Feb 7, 2019
41e4982
Fix the clock resolution to millis in ScheduledEventTests (#38506)
Feb 6, 2019
dde201e
Fix checkstyle
alpar-t Feb 7, 2019
6097efc
fixed rolling upgrade tests
martijnvg Feb 7, 2019
62eb470
fixed wrong comparison
martijnvg Feb 7, 2019
a717e5e
Mute tests
Tim-Brooks Feb 7, 2019
cbdf0dd
Merge branch 'add-seven-dot-one' of github.com:jasontedor/elasticsear…
Tim-Brooks Feb 7, 2019
e1ceb53
added pre 7 version and post 7 version of the test
martijnvg Feb 7, 2019
d3d9aaf
Revert "added pre 7 version and post 7 version of the test"
martijnvg Feb 7, 2019
5fa7633
finally fixed rolling upgrade tests, by muteing a test,
martijnvg Feb 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,30 +171,38 @@ public UnreleasedVersionInfo unreleasedInfo(Version version) {
}

public void forPreviousUnreleased(Consumer<UnreleasedVersionInfo> consumer) {
getUnreleased().stream()
List<UnreleasedVersionInfo> collect = getUnreleased().stream()
.filter(version -> version.equals(currentVersion) == false)
.forEach(version -> consumer.accept(
new UnreleasedVersionInfo(
.map(version -> new UnreleasedVersionInfo(
version,
getBranchFor(version),
getGradleProjectNameFor(version)
)
));
)
.collect(Collectors.toList());

collect.forEach(uvi -> consumer.accept(uvi));
}

private String getGradleProjectNameFor(Version version) {
if (version.equals(currentVersion)) {
throw new IllegalArgumentException("The Gradle project to build " + version + " is the current build.");
}

Map<Integer, List<Version>> releasedMajorGroupedByMinor = getReleasedMajorGroupedByMinor();

if (version.getRevision() == 0) {
if (releasedMajorGroupedByMinor
.get(releasedMajorGroupedByMinor.keySet().stream().max(Integer::compareTo).orElse(0))
.contains(version)) {
return "minor";
List<Version> unreleasedStagedOrMinor = getUnreleased().stream()
.filter(v -> v.getRevision() == 0)
.collect(Collectors.toList());
if (unreleasedStagedOrMinor.size() > 2) {
if (unreleasedStagedOrMinor.get(unreleasedStagedOrMinor.size() - 2).equals(version)) {
return "minor";
} else{
return "staged";
}
} else {
return "staged";
return "minor";
}
} else {
if (releasedMajorGroupedByMinor
Expand Down Expand Up @@ -239,8 +247,10 @@ public List<Version> getUnreleased() {
unreleased.add(getLatestVersionByKey(groupByMinor, greatestMinor - 1));
if (groupByMinor.getOrDefault(greatestMinor - 1, emptyList()).size() == 1) {
// we found that the previous minor is staged but not yet released
// in this case, the minor before that has a bugfix
unreleased.add(getLatestVersionByKey(groupByMinor, greatestMinor - 2));
// in this case, the minor before that has a bugfix, should there be such a minor
if (greatestMinor >= 2) {
unreleased.add(getLatestVersionByKey(groupByMinor, greatestMinor - 2));
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ public class VersionCollectionTests extends GradleUnitTestCase {
"6_0_0", "6_0_1", "6_1_0", "6_1_1", "6_1_2", "6_1_3", "6_1_4", "6_2_0", "6_2_1", "6_2_2", "6_2_3",
"6_2_4", "6_3_0", "6_3_1", "6_3_2", "6_4_0", "6_4_1", "6_4_2"
));
sampleVersions.put("7.1.0", asList(
"7_1_0", "7_0_0", "6_7_0", "6_6_1", "6_6_0"
));
}

@Test(expected = IllegalArgumentException.class)
Expand Down Expand Up @@ -145,6 +148,11 @@ public void testWireCompatible() {
singletonList("7.3.0"),
getVersionCollection("8.0.0").getWireCompatible()
);
assertVersionsEquals(
asList("6.7.0", "7.0.0"),
getVersionCollection("7.1.0").getWireCompatible()
);

}

public void testWireCompatibleUnreleased() {
Expand All @@ -171,6 +179,10 @@ public void testWireCompatibleUnreleased() {
singletonList("7.3.0"),
getVersionCollection("8.0.0").getUnreleasedWireCompatible()
);
assertVersionsEquals(
asList("6.7.0", "7.0.0"),
getVersionCollection("7.1.0").getWireCompatible()
);
}

public void testIndexCompatible() {
Expand Down Expand Up @@ -286,7 +298,7 @@ public void testGetBranch() {
getVersionCollection("6.4.2")
);
assertUnreleasedBranchNames(
asList("5.6", "6.4", "6.5"),
asList("5.6", "6.4", "6.x"),
getVersionCollection("6.6.0")
);
assertUnreleasedBranchNames(
Expand All @@ -309,13 +321,17 @@ public void testGetGradleProjectName() {
getVersionCollection("6.4.2")
);
assertUnreleasedGradleProjectNames(
asList("maintenance", "bugfix", "staged"),
asList("maintenance", "bugfix", "minor"),
getVersionCollection("6.6.0")
);
assertUnreleasedGradleProjectNames(
asList("bugfix", "staged", "minor"),
getVersionCollection("8.0.0")
);
assertUnreleasedGradleProjectNames(
asList("staged", "minor"),
getVersionCollection("7.1.0")
);
}

public void testCompareToAuthoritative() {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
elasticsearch = 7.0.0
elasticsearch = 7.1.0
lucene = 8.0.0-snapshot-83f9835

# optional dependencies
Expand Down
6 changes: 6 additions & 0 deletions distribution/bwc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ bwcVersions.forPreviousUnreleased { VersionCollection.UnreleasedVersionInfo unre
extension += '.gz'
}
}
if (bwcVersion.onOrAfter('7.0.0') && projectName.contains('deb')) {
classifier = "-amd64"
}
if (bwcVersion.onOrAfter('7.0.0') && projectName.contains('rpm')) {
classifier = "-x86_64"
}
if (bwcVersion.onOrAfter('6.3.0')) {
baseDir += projectName.endsWith('zip') || projectName.endsWith('tar') ? '/archives' : '/packages'
// add oss variant first
Expand Down
2 changes: 1 addition & 1 deletion distribution/docker/src/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ RUN groupadd -g 1000 elasticsearch && \
WORKDIR /usr/share/elasticsearch

COPY ${elasticsearch} /opt/

RUN tar zxf /opt/${elasticsearch} --strip-components=1
RUN mkdir -p config data logs
RUN chmod 0775 config data logs
COPY config/elasticsearch.yml config/log4j2.properties config/


################################################################################
# Build stage 1 (the actual elasticsearch image):
# Copy elasticsearch from stage 0
Expand Down
4 changes: 2 additions & 2 deletions docs/Versions.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
:version: 7.0.0-alpha2
:version: 7.1.0
:major-version: 7.x
:lucene_version: 8.0.0
:lucene_version_path: 8_0_0
:branch: master
:branch: 7.x
:jdk: 1.8.0_131
:jdk_major: 8
:build_flavor: default
Expand Down
Loading