Skip to content

Commit 393ce41

Browse files
authored
Enable bwc tests after backport of bounds in aggregations refactoring (#60688)
This commit enables all bwc tests after #60681 is merged.
1 parent 5d9de8c commit 393ce41

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ tasks.register("verifyVersions") {
174174
* after the backport of the backcompat code is complete.
175175
*/
176176

177-
boolean bwc_tests_enabled = false
178-
final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/60681" /* place a PR link here when committing bwc changes */
177+
boolean bwc_tests_enabled = true
178+
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
179179
if (bwc_tests_enabled == false) {
180180
if (bwc_tests_disabled_issue.isEmpty()) {
181181
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")

server/src/main/java/org/elasticsearch/search/aggregations/bucket/histogram/HistogramAggregationBuilder.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ public HistogramAggregationBuilder(StreamInput in) throws IOException {
130130
minDocCount = in.readVLong();
131131
interval = in.readDouble();
132132
offset = in.readDouble();
133-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
133+
if (in.getVersion().onOrAfter(Version.V_7_10_0)) {
134134
extendedBounds = in.readOptionalWriteable(DoubleBounds::new);
135+
hardBounds = in.readOptionalWriteable(DoubleBounds::new);
135136
} else {
136137
double minBound = in.readDouble();
137138
double maxBound = in.readDouble();
@@ -141,9 +142,6 @@ public HistogramAggregationBuilder(StreamInput in) throws IOException {
141142
extendedBounds = new DoubleBounds(minBound, maxBound);
142143
}
143144
}
144-
if (in.getVersion().onOrAfter(Version.V_7_10_0)) {
145-
hardBounds = in.readOptionalWriteable(DoubleBounds::new);
146-
}
147145
}
148146

149147
@Override
@@ -153,8 +151,9 @@ protected void innerWriteTo(StreamOutput out) throws IOException {
153151
out.writeVLong(minDocCount);
154152
out.writeDouble(interval);
155153
out.writeDouble(offset);
156-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
154+
if (out.getVersion().onOrAfter(Version.V_7_10_0)) {
157155
out.writeOptionalWriteable(extendedBounds);
156+
out.writeOptionalWriteable(hardBounds);
158157
} else {
159158
if (extendedBounds != null) {
160159
out.writeDouble(extendedBounds.getMin());
@@ -164,9 +163,6 @@ protected void innerWriteTo(StreamOutput out) throws IOException {
164163
out.writeDouble(Double.NEGATIVE_INFINITY);
165164
}
166165
}
167-
if (out.getVersion().onOrAfter(Version.V_7_10_0)) {
168-
out.writeOptionalWriteable(hardBounds);
169-
}
170166
}
171167

172168
/** Get the current interval that is set on this builder. */

0 commit comments

Comments
 (0)