From 25c9a3bfdefb49b08418823ca9bf6cb057b4f348 Mon Sep 17 00:00:00 2001 From: Nicholas Walter Knize Date: Thu, 17 Aug 2023 08:00:31 -0500 Subject: [PATCH] re-enable bwc testing and change version to prevent fail Signed-off-by: Nicholas Walter Knize --- build.gradle | 4 ++-- .../src/main/java/org/opensearch/search/DocValueFormat.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 45d07f75e0e54..eef5d6d5b442c 100644 --- a/build.gradle +++ b/build.gradle @@ -225,10 +225,10 @@ tasks.register("verifyVersions") { * after the backport of the backcompat code is complete. */ -boolean bwc_tests_enabled = false +boolean bwc_tests_enabled = true /* place an issue link here when committing bwc changes */ -String bwc_tests_disabled_issue = "https://github.com/opensearch-project/OpenSearch/issues/9349" +String bwc_tests_disabled_issue = "" /* there's no existing MacOS release, therefore disable bcw tests */ if (Os.isFamily(Os.FAMILY_MAC)) { diff --git a/server/src/main/java/org/opensearch/search/DocValueFormat.java b/server/src/main/java/org/opensearch/search/DocValueFormat.java index 12debec51ce64..c6187e5949035 100644 --- a/server/src/main/java/org/opensearch/search/DocValueFormat.java +++ b/server/src/main/java/org/opensearch/search/DocValueFormat.java @@ -248,7 +248,7 @@ public DateTime(StreamInput in) throws IOException { String zoneId = in.readString(); this.timeZone = ZoneId.of(zoneId); this.resolution = DateFieldMapper.Resolution.ofOrdinal(in.readVInt()); - if (in.getVersion().before(Version.V_2_10_0)) { + if (in.getVersion().before(Version.V_3_0_0)) { in.readBoolean(); // ignore deprecated joda } } @@ -263,7 +263,7 @@ public void writeTo(StreamOutput out) throws IOException { out.writeString(formatter.pattern()); out.writeString(timeZone.getId()); out.writeVInt(resolution.ordinal()); - if (out.getVersion().before(Version.V_2_10_0)) { + if (out.getVersion().before(Version.V_3_0_0)) { out.writeBoolean(false); // ignore deprecated joda flag } }