Skip to content

Commit 26fed22

Browse files
authored
re-enable bwc tests and update geo-grid bounds version guard to 7.6 after #50996 (#50997)
after #50996 (backport of #50002) merged, the version guard on geo-grid `bounds` parameter can be updated to 7.6 re-enables bwc tests
1 parent 5eaa3a7 commit 26fed22

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ task verifyVersions {
205205
* after the backport of the backcompat code is complete.
206206
*/
207207

208-
boolean bwc_tests_enabled = false
209-
final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/50996" /* place a PR link here when committing bwc changes */
208+
boolean bwc_tests_enabled = true
209+
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
210210
if (bwc_tests_enabled == false) {
211211
if (bwc_tests_disabled_issue.isEmpty()) {
212212
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")

server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/GeoTileGridValuesSourceBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static GeoTileGridValuesSourceBuilder parse(String name, XContentParser parser)
6767
GeoTileGridValuesSourceBuilder(StreamInput in) throws IOException {
6868
super(in);
6969
this.precision = in.readInt();
70-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
70+
if (in.getVersion().onOrAfter(Version.V_7_6_0)) {
7171
this.geoBoundingBox = new GeoBoundingBox(in);
7272
}
7373
}
@@ -90,7 +90,7 @@ public GeoTileGridValuesSourceBuilder format(String format) {
9090
@Override
9191
protected void innerWriteTo(StreamOutput out) throws IOException {
9292
out.writeInt(precision);
93-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
93+
if (out.getVersion().onOrAfter(Version.V_7_6_0)) {
9494
geoBoundingBox.writeTo(out);
9595
}
9696
}

server/src/main/java/org/elasticsearch/search/aggregations/bucket/geogrid/GeoGridAggregationBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public GeoGridAggregationBuilder(StreamInput in) throws IOException {
9898
precision = in.readVInt();
9999
requiredSize = in.readVInt();
100100
shardSize = in.readVInt();
101-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
101+
if (in.getVersion().onOrAfter(Version.V_7_6_0)) {
102102
geoBoundingBox = new GeoBoundingBox(in);
103103
}
104104
}
@@ -108,7 +108,7 @@ protected void innerWriteTo(StreamOutput out) throws IOException {
108108
out.writeVInt(precision);
109109
out.writeVInt(requiredSize);
110110
out.writeVInt(shardSize);
111-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
111+
if (out.getVersion().onOrAfter(Version.V_7_6_0)) {
112112
geoBoundingBox.writeTo(out);
113113
}
114114
}

server/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoHashGridTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ protected GeoHashGridAggregationBuilder createTestAggregatorBuilder() {
5959
}
6060

6161
public void testSerializationPreBounds() throws Exception {
62-
Version noBoundsSupportVersion = VersionUtils.randomPreviousCompatibleVersion(random(), Version.V_8_0_0);
62+
Version noBoundsSupportVersion = VersionUtils.randomVersionBetween(random(), Version.V_7_0_0, Version.V_7_5_0);
6363
GeoHashGridAggregationBuilder builder = createTestAggregatorBuilder();
6464
try (BytesStreamOutput output = new BytesStreamOutput()) {
65-
output.setVersion(Version.V_8_0_0);
65+
output.setVersion(Version.V_7_6_0);
6666
builder.writeTo(output);
6767
try (StreamInput in = new NamedWriteableAwareStreamInput(output.bytes().streamInput(),
6868
new NamedWriteableRegistry(Collections.emptyList()))) {

server/src/test/java/org/elasticsearch/search/aggregations/bucket/GeoTileGridTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ protected GeoTileGridAggregationBuilder createTestAggregatorBuilder() {
5959
}
6060

6161
public void testSerializationPreBounds() throws Exception {
62-
Version noBoundsSupportVersion = VersionUtils.randomPreviousCompatibleVersion(random(), Version.V_8_0_0);
62+
Version noBoundsSupportVersion = VersionUtils.randomVersionBetween(random(), Version.V_7_0_0, Version.V_7_5_0);
6363
GeoTileGridAggregationBuilder builder = createTestAggregatorBuilder();
6464
try (BytesStreamOutput output = new BytesStreamOutput()) {
65-
output.setVersion(Version.V_8_0_0);
65+
output.setVersion(Version.V_7_6_0);
6666
builder.writeTo(output);
6767
try (StreamInput in = new NamedWriteableAwareStreamInput(output.bytes().streamInput(),
6868
new NamedWriteableRegistry(Collections.emptyList()))) {

server/src/test/java/org/elasticsearch/search/aggregations/bucket/composite/GeoTileGridValuesSourceBuilderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ public void testSetFormat() {
4343
}
4444

4545
public void testBWCBounds() throws IOException {
46-
Version noBoundsSupportVersion = VersionUtils.randomPreviousCompatibleVersion(random(), Version.V_8_0_0);
46+
Version noBoundsSupportVersion = VersionUtils.randomVersionBetween(random(), Version.V_7_0_0, Version.V_7_5_0);
4747
GeoTileGridValuesSourceBuilder builder = new GeoTileGridValuesSourceBuilder("name");
4848
if (randomBoolean()) {
4949
builder.geoBoundingBox(GeoBoundingBoxTests.randomBBox());
5050
}
5151
try (BytesStreamOutput output = new BytesStreamOutput()) {
52-
output.setVersion(Version.V_8_0_0);
52+
output.setVersion(Version.V_7_6_0);
5353
builder.writeTo(output);
5454
try (StreamInput in = new NamedWriteableAwareStreamInput(output.bytes().streamInput(),
5555
new NamedWriteableRegistry(Collections.emptyList()))) {

0 commit comments

Comments
 (0)