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

[Version] Add 1.0.1 revision #1152

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ BWC_VERSION:
- "7.10.1"
- "7.10.2"
- "1.0.0"
- "1.0.1"
- "1.1.0"
1 change: 1 addition & 0 deletions server/src/main/java/org/opensearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class Version implements Comparable<Version>, ToXContentFragment {
public static final Version V_EMPTY = new Version(V_EMPTY_ID, org.apache.lucene.util.Version.LATEST);

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 CURRENT = V_1_1_0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,20 @@ static Tuple<List<Version>, List<Version>> resolveReleasedVersions(Version curre
// remove last minor unless the it's the first OpenSearch version.
// all Legacy ES versions are released, so we don't exclude any.
if (current.equals(Version.V_1_0_0) == false) {
Version lastMinor = moveLastToUnreleased(stableVersions, unreleasedVersions);
if (lastMinor.revision == 0) {
if (stableVersions.get(stableVersions.size() - 1).size() == 1) {
// a minor is being staged, which is also unreleased
moveLastToUnreleased(stableVersions, unreleasedVersions);
}
// remove the next bugfix
if (stableVersions.isEmpty() == false) {
moveLastToUnreleased(stableVersions, unreleasedVersions);
List<Version> lastMinorLine = stableVersions.get(stableVersions.size() - 1);
if (lastMinorLine.get(lastMinorLine.size() - 1) instanceof LegacyESVersion == false) {
// if the last minor line is Legacy there are no more staged releases; do nothing
Version lastMinor = moveLastToUnreleased(stableVersions, unreleasedVersions);
if (lastMinor instanceof LegacyESVersion == false && lastMinor.revision == 0) {
// no more staged legacy versions
if (stableVersions.get(stableVersions.size() - 1).size() == 1) {
// a minor is being staged, which is also unreleased
moveLastToUnreleased(stableVersions, unreleasedVersions);
}
// remove the next bugfix
if (stableVersions.isEmpty() == false) {
moveLastToUnreleased(stableVersions, unreleasedVersions);
}
}
}
}
Expand Down