Skip to content

Commit

Permalink
Fixing build failures after Flavor Serialization backport (#1867)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta authored Jan 8, 2022
1 parent 1bb8864 commit c71ff87
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/src/main/java/org/opensearch/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ public static Build readBuild(StreamInput in) throws IOException {
// TODO - clean this up when OSS flavor is removed in all of the code base
// (Integ test zip still write OSS as distribution)
// See issue: https://github.com/opendistro-for-elasticsearch/search/issues/159
// todo change to V_1_3_0 after backporting
if (in.getVersion().before(Version.V_2_0_0)) {
if (in.getVersion().before(Version.V_1_3_0)) {
String flavor = in.readString();
}
// be lenient when reading on the wire, the enumeration values from other versions might be different than what we know
Expand All @@ -242,8 +241,7 @@ public static void writeBuild(Build build, StreamOutput out) throws IOException
// The following block is kept for existing BWS tests to pass.
// TODO - clean up this code when we remove all v6 bwc tests.
// TODO - clean this up when OSS flavor is removed in all of the code base
// todo change to V_1_3_0 after backporting
if (out.getVersion().before(Version.V_2_0_0)) {
if (out.getVersion().before(Version.V_1_3_0)) {
out.writeString("oss");
}
final Type buildType = build.type();
Expand Down

0 comments on commit c71ff87

Please sign in to comment.