Skip to content

Commit

Permalink
Bump minimum wire compatibility version to 7.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira committed Dec 16, 2021
1 parent e7b2a0d commit 0d3fc85
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class BwcVersions {
private static final Pattern LINE_PATTERN = Pattern.compile(
"\\W+public static final Version V_(\\d+)_(\\d+)_(\\d+)(_alpha\\d+|_beta\\d+|_rc\\d+)? .*?LUCENE_(\\d+)_(\\d+)_(\\d+)\\);"
);
private static final Version MINIMUM_WIRE_COMPATIBLE_VERSION = Version.fromString("7.16.0");
private static final Version MINIMUM_WIRE_COMPATIBLE_VERSION = Version.fromString("7.17.0");

private final VersionPair currentVersion;
private final List<VersionPair> versions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,25 @@ class BwcVersionsSpec extends Specification {
addVersion('7.15.1', '8.9.0')
addVersion('7.15.2', '8.9.0')
addVersion('7.16.0', '8.10.0')
addVersion('7.16.1', '8.10.0')
addVersion('7.16.2', '8.10.0')
addVersion('7.17.0', '8.10.0')
addVersion('8.0.0', '9.0.0')
addVersion('8.1.0', '9.0.0')

when:
def bwc = new BwcVersions(versionLines, v('8.0.0'))
def bwc = new BwcVersions(versionLines, v('8.1.0'))
def unreleased = bwc.unreleased.collectEntries { [it, bwc.unreleasedInfo(it)] }

then:
unreleased == [
(v('7.15.2')): new UnreleasedVersionInfo(v('7.15.2'), '7.15', ':distribution:bwc:bugfix'),
(v('7.16.0')): new UnreleasedVersionInfo(v('7.16.0'), '7.16', ':distribution:bwc:staged'),
(v('8.0.0')): new UnreleasedVersionInfo(v('8.0.0'), 'master', ':distribution')
(v('7.16.2')): new UnreleasedVersionInfo(v('7.16.2'), '7.16', ':distribution:bwc:bugfix'),
(v('7.17.0')): new UnreleasedVersionInfo(v('7.17.0'), '7.17', ':distribution:bwc:staged'),
(v('8.0.0')): new UnreleasedVersionInfo(v('8.0.0'), '8.0', ':distribution:bwc:minor'),
(v('8.1.0')): new UnreleasedVersionInfo(v('8.1.0'), 'master', ':distribution')
]
bwc.wireCompatible == [v('7.16.0'), v('8.0.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('8.0.0')]
bwc.wireCompatible == [v('7.17.0'), v('8.0.0'), v('8.1.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('7.16.2'), v('7.17.0'), v('8.0.0'), v('8.1.0')]
}

def "current version is next minor with next major and last minor both staged"() {
Expand All @@ -51,6 +56,8 @@ class BwcVersionsSpec extends Specification {
addVersion('7.15.1', '8.9.0')
addVersion('7.15.2', '8.9.0')
addVersion('7.16.0', '8.10.0')
addVersion('7.16.1', '8.10.0')
addVersion('7.17.0', '8.10.0')
addVersion('8.0.0', '9.0.0')
addVersion('8.1.0', '9.1.0')

Expand All @@ -60,13 +67,13 @@ class BwcVersionsSpec extends Specification {

then:
unreleased == [
(v('7.15.2')): new UnreleasedVersionInfo(v('7.15.2'), '7.15', ':distribution:bwc:bugfix'),
(v('7.16.0')): new UnreleasedVersionInfo(v('7.16.0'), '7.16', ':distribution:bwc:staged'),
(v('7.16.1')): new UnreleasedVersionInfo(v('7.16.1'), '7.16', ':distribution:bwc:bugfix'),
(v('7.17.0')): new UnreleasedVersionInfo(v('7.17.0'), '7.17', ':distribution:bwc:staged'),
(v('8.0.0')): new UnreleasedVersionInfo(v('8.0.0'), '8.0', ':distribution:bwc:minor'),
(v('8.1.0')): new UnreleasedVersionInfo(v('8.1.0'), 'master', ':distribution')
]
bwc.wireCompatible == [v('7.16.0'), v('8.0.0'), v('8.1.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('8.0.0'), v('8.1.0')]
bwc.wireCompatible == [v('7.17.0'), v('8.0.0'), v('8.1.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('7.17.0'), v('8.0.0'), v('8.1.0')]
}

def "current is next minor with upcoming minor staged"() {
Expand All @@ -79,6 +86,8 @@ class BwcVersionsSpec extends Specification {
addVersion('7.15.2', '8.9.0')
addVersion('7.16.0', '8.10.0')
addVersion('7.16.1', '8.10.0')
addVersion('7.17.0', '8.10.0')
addVersion('7.17.1', '8.10.0')
addVersion('8.0.0', '9.0.0')
addVersion('8.1.0', '9.1.0')

Expand All @@ -88,12 +97,12 @@ class BwcVersionsSpec extends Specification {

then:
unreleased == [
(v('7.16.1')): new UnreleasedVersionInfo(v('7.16.1'), '7.16', ':distribution:bwc:bugfix'),
(v('7.17.1')): new UnreleasedVersionInfo(v('7.17.1'), '7.17', ':distribution:bwc:bugfix'),
(v('8.0.0')): new UnreleasedVersionInfo(v('8.0.0'), '8.0', ':distribution:bwc:staged'),
(v('8.1.0')): new UnreleasedVersionInfo(v('8.1.0'), 'master', ':distribution')
]
bwc.wireCompatible == [v('7.16.0'), v('7.16.1'), v('8.0.0'), v('8.1.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('8.0.0'), v('8.1.0')]
bwc.wireCompatible == [v('7.17.0'), v('7.17.1'), v('8.0.0'), v('8.1.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('7.17.0'), v('7.17.1'), v('8.0.0'), v('8.1.0')]
}

def "current version is staged major"() {
Expand All @@ -106,6 +115,8 @@ class BwcVersionsSpec extends Specification {
addVersion('7.15.2', '8.9.0')
addVersion('7.16.0', '8.10.0')
addVersion('7.16.1', '8.10.0')
addVersion('7.17.0', '8.10.0')
addVersion('7.17.1', '8.10.0')
addVersion('8.0.0', '9.0.0')

when:
Expand All @@ -114,11 +125,11 @@ class BwcVersionsSpec extends Specification {

then:
unreleased == [
(v('7.16.1')): new UnreleasedVersionInfo(v('7.16.1'), '7.16', ':distribution:bwc:bugfix'),
(v('7.17.1')): new UnreleasedVersionInfo(v('7.17.1'), '7.17', ':distribution:bwc:bugfix'),
(v('8.0.0')): new UnreleasedVersionInfo(v('8.0.0'), 'master', ':distribution'),
]
bwc.wireCompatible == [v('7.16.0'), v('7.16.1'), v('8.0.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('8.0.0')]
bwc.wireCompatible == [v('7.17.0'), v('7.17.1'), v('8.0.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('7.17.0'), v('7.17.1'), v('8.0.0')]
}

def "current version is next bugfix"() {
Expand All @@ -131,6 +142,8 @@ class BwcVersionsSpec extends Specification {
addVersion('7.15.2', '8.9.0')
addVersion('7.16.0', '8.10.0')
addVersion('7.16.1', '8.10.0')
addVersion('7.17.0', '8.10.0')
addVersion('7.17.1', '8.10.0')
addVersion('8.0.0', '9.0.0')
addVersion('8.0.1', '9.0.0')

Expand All @@ -140,11 +153,11 @@ class BwcVersionsSpec extends Specification {

then:
unreleased == [
(v('7.16.1')): new UnreleasedVersionInfo(v('7.16.1'), '7.16', ':distribution:bwc:maintenance'),
(v('7.17.1')): new UnreleasedVersionInfo(v('7.17.1'), '7.17', ':distribution:bwc:maintenance'),
(v('8.0.1')): new UnreleasedVersionInfo(v('8.0.1'), 'master', ':distribution'),
]
bwc.wireCompatible == [v('7.16.0'), v('7.16.1'), v('8.0.0'), v('8.0.1')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('8.0.0'), v('8.0.1')]
bwc.wireCompatible == [v('7.17.0'), v('7.17.1'), v('8.0.0'), v('8.0.1')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('7.17.0'), v('7.17.1'), v('8.0.0'), v('8.0.1')]
}

def "current version is next minor with no staged releases"() {
Expand All @@ -157,6 +170,8 @@ class BwcVersionsSpec extends Specification {
addVersion('7.15.2', '8.9.0')
addVersion('7.16.0', '8.10.0')
addVersion('7.16.1', '8.10.0')
addVersion('7.17.0', '8.10.0')
addVersion('7.17.1', '8.10.0')
addVersion('8.0.0', '9.0.0')
addVersion('8.0.1', '9.0.0')
addVersion('8.1.0', '9.1.0')
Expand All @@ -167,12 +182,12 @@ class BwcVersionsSpec extends Specification {

then:
unreleased == [
(v('7.16.1')): new UnreleasedVersionInfo(v('7.16.1'), '7.16', ':distribution:bwc:maintenance'),
(v('7.17.1')): new UnreleasedVersionInfo(v('7.17.1'), '7.17', ':distribution:bwc:maintenance'),
(v('8.0.1')): new UnreleasedVersionInfo(v('8.0.1'), '8.0', ':distribution:bwc:bugfix'),
(v('8.1.0')): new UnreleasedVersionInfo(v('8.1.0'), 'master', ':distribution')
]
bwc.wireCompatible == [v('7.16.0'), v('7.16.1'), v('8.0.0'), v('8.0.1'), v('8.1.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('8.0.0'), v('8.0.1'), v('8.1.0')]
bwc.wireCompatible == [v('7.17.0'), v('7.17.1'), v('8.0.0'), v('8.0.1'), v('8.1.0')]
bwc.indexCompatible == [v('7.14.0'), v('7.14.1'), v('7.14.2'), v('7.15.0'), v('7.15.1'), v('7.15.2'), v('7.16.0'), v('7.16.1'), v('7.17.0'), v('7.17.1'), v('8.0.0'), v('8.0.1'), v('8.1.0')]
}

private void addVersion(String elasticsearch, String lucene) {
Expand Down

0 comments on commit 0d3fc85

Please sign in to comment.