From ac37cc99b2e7960ae6ec39df0d7020446703ca2c Mon Sep 17 00:00:00 2001 From: Nick Knize Date: Thu, 4 Nov 2021 14:19:21 -0500 Subject: [PATCH] Add staged version 1.1.1 (#1506) Signed-off-by: Nicholas Walter Knize --- .ci/bwcVersions | 1 + .../src/main/java/org/opensearch/gradle/BwcVersions.java | 5 ++++- server/src/main/java/org/opensearch/Version.java | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.ci/bwcVersions b/.ci/bwcVersions index 59b860cc632..2fef886f8ab 100644 --- a/.ci/bwcVersions +++ b/.ci/bwcVersions @@ -77,4 +77,5 @@ BWC_VERSION: - "1.0.0" - "1.0.1" - "1.1.0" + - "1.1.1" - "1.2.0" diff --git a/buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java b/buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java index 67581a35cdc..d6a770d7cf4 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java @@ -174,7 +174,10 @@ public class BwcVersions { private void assertNoOlderThanTwoMajors() { Set majors = groupByMajor.keySet(); - if (majors.size() != 2 && currentVersion.getMinor() != 0 && currentVersion.getRevision() != 0) { + // until OpenSearch 3.0 we will need to carry three major support + // (1, 7, 6) && (2, 1, 7) since OpenSearch 1.0 === Legacy 7.x + int numSupportedMajors = (currentVersion.getMajor() < 3) ? 3 : 2; + if (majors.size() != numSupportedMajors && currentVersion.getMinor() != 0 && currentVersion.getRevision() != 0) { throw new IllegalStateException("Expected exactly 2 majors in parsed versions but found: " + majors); } } diff --git a/server/src/main/java/org/opensearch/Version.java b/server/src/main/java/org/opensearch/Version.java index aea2afd066a..331f0377048 100644 --- a/server/src/main/java/org/opensearch/Version.java +++ b/server/src/main/java/org/opensearch/Version.java @@ -73,6 +73,7 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_1_0_0 = new Version(1000099, org.apache.lucene.util.Version.LUCENE_8_8_2); public static final Version V_1_0_1 = new Version(1000199, org.apache.lucene.util.Version.LUCENE_8_8_2); public static final Version V_1_1_0 = new Version(1010099, org.apache.lucene.util.Version.LUCENE_8_9_0); + public static final Version V_1_1_1 = new Version(1010199, org.apache.lucene.util.Version.LUCENE_8_9_0); public static final Version V_1_2_0 = new Version(1020099, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version V_2_0_0 = new Version(2000099, org.apache.lucene.util.Version.LUCENE_8_10_1); public static final Version CURRENT = V_2_0_0;