mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 01:22:26 -04:00
Update BWC versions to support multiple staged releases
This commit is contained in:
parent
da65532e9c
commit
6c405093d7
5 changed files with 39 additions and 1 deletions
|
@ -14,6 +14,7 @@ include ":distribution:bwc:bugfix2"
|
|||
include ":distribution:bwc:minor"
|
||||
include ":distribution:bwc:major"
|
||||
include ":distribution:bwc:staged"
|
||||
include ":distribution:bwc:staged2"
|
||||
include ":distribution:bwc:maintenance"
|
||||
include ":distribution:archives:darwin-tar"
|
||||
include ":distribution:archives:oss-darwin-tar"
|
||||
|
|
|
@ -166,6 +166,7 @@ public class BwcVersions implements Serializable {
|
|||
.toList();
|
||||
|
||||
boolean existingBugfix = false;
|
||||
boolean existingStaged = false;
|
||||
for (int i = 0; i < featureFreezeBranches.size(); i++) {
|
||||
String branch = featureFreezeBranches.get(i);
|
||||
Version version = versions.stream()
|
||||
|
@ -193,7 +194,9 @@ public class BwcVersions implements Serializable {
|
|||
if (i == featureFreezeBranches.size() - 1) {
|
||||
result.put(version, new UnreleasedVersionInfo(version, branch, ":distribution:bwc:maintenance"));
|
||||
} else if (version.getRevision() == 0) { // This is the next staged minor
|
||||
result.put(version, new UnreleasedVersionInfo(version, branch, ":distribution:bwc:staged"));
|
||||
String project = existingStaged ? "staged2" : "staged";
|
||||
result.put(version, new UnreleasedVersionInfo(version, branch, ":distribution:bwc:" + project));
|
||||
existingStaged = true;
|
||||
} else { // This is a bugfix
|
||||
String project = existingBugfix ? "bugfix2" : "bugfix";
|
||||
result.put(version, new UnreleasedVersionInfo(version, branch, ":distribution:bwc:" + project));
|
||||
|
|
|
@ -77,6 +77,39 @@ class BwcVersionsSpec extends Specification {
|
|||
bwc.indexCompatible == [v('8.14.0'), v('8.14.1'), v('8.14.2'), v('8.15.0'), v('8.15.1'), v('8.15.2'), v('8.16.0'), v('8.16.1'), v('8.17.0'), v('8.18.0'), v('9.0.0')]
|
||||
}
|
||||
|
||||
def "current version is next major with two staged minors"() {
|
||||
given:
|
||||
addVersion('7.17.10', '8.9.0')
|
||||
addVersion('8.15.0', '9.9.0')
|
||||
addVersion('8.15.1', '9.9.0')
|
||||
addVersion('8.15.2', '9.9.0')
|
||||
addVersion('8.16.0', '9.10.0')
|
||||
addVersion('8.16.1', '9.10.0')
|
||||
addVersion('8.16.2', '9.10.0')
|
||||
addVersion('8.17.0', '9.10.0')
|
||||
addVersion('8.17.1', '9.10.0')
|
||||
addVersion('8.18.0', '9.10.0')
|
||||
addVersion('8.19.0', '9.10.0')
|
||||
addVersion('9.0.0', '10.0.0')
|
||||
addVersion('9.1.0', '10.1.0')
|
||||
|
||||
when:
|
||||
def bwc = new BwcVersions(versionLines, v('9.1.0'), ['main', '9.0', '8.x', '8.18', '8.17', '8.16', '7.17'])
|
||||
def unreleased = bwc.unreleased.collectEntries { [it, bwc.unreleasedInfo(it)] }
|
||||
|
||||
then:
|
||||
unreleased == [
|
||||
(v('8.16.2')): new UnreleasedVersionInfo(v('8.16.2'), '8.16', ':distribution:bwc:bugfix2'),
|
||||
(v('8.17.1')): new UnreleasedVersionInfo(v('8.17.1'), '8.17', ':distribution:bwc:bugfix'),
|
||||
(v('8.18.0')): new UnreleasedVersionInfo(v('8.18.0'), '8.18', ':distribution:bwc:staged2'),
|
||||
(v('8.19.0')): new UnreleasedVersionInfo(v('8.19.0'), '8.x', ':distribution:bwc:minor'),
|
||||
(v('9.0.0')): new UnreleasedVersionInfo(v('9.0.0'), '9.0', ':distribution:bwc:staged'),
|
||||
(v('9.1.0')): new UnreleasedVersionInfo(v('9.1.0'), 'main', ':distribution'),
|
||||
]
|
||||
bwc.wireCompatible == [v('8.19.0'), v('9.0.0'), v('9.1.0')]
|
||||
bwc.indexCompatible == [v('8.15.0'), v('8.15.1'), v('8.15.2'), v('8.16.0'), v('8.16.1'), v('8.16.2'), v('8.17.0'), v('8.17.1'), v('8.18.0'), v('8.19.0'), v('9.0.0'), v('9.1.0')]
|
||||
}
|
||||
|
||||
def "current version is first new minor in major series"() {
|
||||
given:
|
||||
addVersion('7.17.10', '8.9.0')
|
||||
|
|
0
distribution/bwc/staged2/build.gradle
Normal file
0
distribution/bwc/staged2/build.gradle
Normal file
|
@ -79,6 +79,7 @@ List projects = [
|
|||
'distribution:bwc:maintenance',
|
||||
'distribution:bwc:minor',
|
||||
'distribution:bwc:staged',
|
||||
'distribution:bwc:staged2',
|
||||
'distribution:bwc:main',
|
||||
'distribution:tools:java-version-checker',
|
||||
'distribution:tools:cli-launcher',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue