Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 7.1 and 8.0 version constants to master #38514

Merged
merged 45 commits into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
95c2796
Add 7.1 and 8.0 version constants to master
jasontedor Feb 6, 2019
bde5654
Merge branch 'master' into eight-dot-oh
jasontedor Feb 6, 2019
78a4ce0
Fix incorrect handling of version collections
alpar-t Feb 6, 2019
7b07a62
Bump mastre version to 8.0.0
alpar-t Feb 6, 2019
49fadfa
Fix bwcBuilds for versions newer than 7.0.0
alpar-t Feb 6, 2019
0531817
move old versions to unreleased
dnhatn Feb 6, 2019
633acbf
Remove Zen1 BWC
DaveCTurner Feb 6, 2019
ced375e
Remove version method
jasontedor Feb 6, 2019
6d84429
Remove unused fields
jasontedor Feb 6, 2019
d7748f4
Remove unused import
jasontedor Feb 6, 2019
f12c54a
Remove more unused imports
jasontedor Feb 6, 2019
64f11fc
Remove bogus assertion
jasontedor Feb 6, 2019
a54cf6c
Use typeless APIs
jasontedor Feb 6, 2019
a15a041
Remove copy_settings flag from resize operations
jkakavas Feb 7, 2019
7e3137b
Revert "Use typeless APIs"
jasontedor Feb 7, 2019
72e8ac6
Some full cluster restart tests passing
jasontedor Feb 7, 2019
93b298a
More fixes
jasontedor Feb 7, 2019
7e8345d
Fixes for rolling upgrade
alpar-t Feb 7, 2019
711fd82
Fix full cluster restart tests
alpar-t Feb 7, 2019
5184cea
Merge remote-tracking branch 'jkakavas/remove-copy-settings' into eig…
alpar-t Feb 7, 2019
8b537b9
Comment out asserts, and remove bwc logic later #38557
martijnvg Feb 7, 2019
ea1822e
Refresh before getting doc count
DaveCTurner Feb 7, 2019
6b87785
Mute version assertions
alpar-t Feb 7, 2019
d9ec294
:server:unitTest passing
alpar-t Feb 7, 2019
b468e42
Fix full cluster restart
alpar-t Feb 7, 2019
29c4a22
removed no longer needed bwc code.
martijnvg Feb 7, 2019
e5b928d
Leftover rest test from #38553
albertzaharovits Feb 7, 2019
cb8b59e
Left over from e5b928d1be26c608f00b940b1e3e3
albertzaharovits Feb 7, 2019
1601d8e
fix verify version constants
alpar-t Feb 7, 2019
f1077d1
Fix method
jasontedor Feb 7, 2019
0c5d19a
Fix x-pack full cluster restart
alpar-t Feb 7, 2019
757d5b1
Remove unneeded branches testing 6.0 bwc
Feb 7, 2019
95c9f2e
Completly fix x-pack full cluster restart
alpar-t Feb 7, 2019
cee8455
Use typeless endpoint in TokenBackwardsCompatibilityIT
Feb 7, 2019
9ce5b19
Fix watcher tests
jkakavas Feb 7, 2019
a542719
Fix checkstyle
alpar-t Feb 7, 2019
71c88f9
Fix old_cluster/40_ml_datafeed_crud.yml
Feb 7, 2019
33a419e
Fix TokenBackwardsCompatibilityIT
Feb 7, 2019
0f11822
Fix transport test
Tim-Brooks Feb 7, 2019
ce62c09
fix checkstyle
andyb-elastic Feb 7, 2019
9990616
Add awaits fix
Tim-Brooks Feb 7, 2019
195a4c3
Revert errant change to Dockerfile
jasontedor Feb 8, 2019
ba8ed18
Mute
Tim-Brooks Feb 8, 2019
97e4964
There might not be any release compat versions
tvernum Feb 8, 2019
94fefca
Only "include_type_name" if running on >= 7
tvernum Feb 8, 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 = 8.0.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
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,21 @@ public void testBasic() throws Exception {
}

public void testRemoveOldVersion() throws Exception {
Version previous = VersionUtils.getPreviousVersion();
if (previous.before(Version.CURRENT.minimumIndexCompatibilityVersion()) ) {
// Can happen when bumping majors: 8.0 is only compat back to 7.0, but that's not released yet
// In this case, ignore what's released and just find that latest version before current
previous = VersionUtils.allVersions().stream()
.filter(v -> v.before(Version.CURRENT))
.max(Version::compareTo)
.get();
}
createPlugin(
"fake",
VersionUtils.randomVersionBetween(
random(),
Version.CURRENT.minimumIndexCompatibilityVersion(),
VersionUtils.getPreviousVersion()));
previous));
removePlugin("fake", home, randomBoolean());
assertThat(Files.exists(env.pluginsFile().resolve("fake")), equalTo(false));
assertRemoveCleaned(env);
Expand Down
4 changes: 2 additions & 2 deletions docs/Versions.asciidoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:version: 7.0.0-alpha2
:major-version: 7.x
:version: 8.0.0-alpha1
:major-version: 8.x
:lucene_version: 8.0.0
:lucene_version_path: 8_0_0
:branch: master
Expand Down
Loading