enable bwc tests and bump versions after backporting https://github.com/elastic/elasticsearch/pull/37639

This commit is contained in:
Boaz Leskes 2019-01-24 12:15:05 +01:00
parent 864e465515
commit af2f4c8f73
8 changed files with 10 additions and 27 deletions

View File

@ -159,8 +159,8 @@ task verifyVersions {
* the enabled state of every bwc task. It should be set back to true
* after the backport of the backcompat code is complete.
*/
final boolean bwc_tests_enabled = false
final String bwc_tests_disabled_issue = "backporting https://github.com/elastic/elasticsearch/pull/37639" /* place a PR link here when committing bwc changes */
final boolean bwc_tests_enabled = true
final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */
if (bwc_tests_enabled == false) {
if (bwc_tests_disabled_issue.isEmpty()) {
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")

View File

@ -44,17 +44,11 @@ setup:
---
"Parent/child inner hits with seq no":
- skip:
version: " - 6.99.99"
reason: support was added in 7.0
- do:
search:
rest_total_hits_as_int: true
body: { "query" : { "has_child" :
{ "type" : "child", "query" : { "match_all" : {} }, "inner_hits" : { "seq_no_primary_term": true} }
} }
- match: { hits.total: 1 }
- match: { hits.hits.0._index: "test" }
- match: { hits.hits.0._id: "1" }
- match: { hits.hits.0.inner_hits.child.hits.hits.0._index: "test"}

View File

@ -87,9 +87,6 @@ setup:
---
"top_hits aggregation with sequence numbers":
- skip:
version: " - 6.99.99"
reason: support was added in 7.0
- do:
search:

View File

@ -24,10 +24,6 @@ setup:
---
"sequence numbers are returned if requested from body":
- skip:
version: " - 6.99.99"
reason: sequence numbers were added in 7.0.0
- do:
search:
index: _all
@ -43,10 +39,6 @@ setup:
---
"sequence numbers are returned if requested from url":
- skip:
version: " - 6.99.99"
reason: sequence numbers were added in 7.0.0
- do:
search:
index: _all

View File

@ -156,7 +156,7 @@ public final class InnerHitBuilder implements Writeable, ToXContentObject {
size = in.readVInt();
explain = in.readBoolean();
version = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_7_0_0)){
if (in.getVersion().onOrAfter(Version.V_6_7_0)){
seqNoAndPrimaryTerm = in.readBoolean();
} else {
seqNoAndPrimaryTerm = false;
@ -205,7 +205,7 @@ public final class InnerHitBuilder implements Writeable, ToXContentObject {
out.writeVInt(size);
out.writeBoolean(explain);
out.writeBoolean(version);
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
out.writeBoolean(seqNoAndPrimaryTerm);
}
out.writeBoolean(trackScores);

View File

@ -784,7 +784,7 @@ public final class SearchHit implements Streamable, ToXContentObject, Iterable<D
type = in.readOptionalText();
nestedIdentity = in.readOptionalWriteable(NestedIdentity::new);
version = in.readLong();
if (in.getVersion().onOrAfter(Version.V_7_0_0)) {
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
seqNo = in.readZLong();
primaryTerm = in.readVLong();
}
@ -856,7 +856,7 @@ public final class SearchHit implements Streamable, ToXContentObject, Iterable<D
out.writeOptionalText(type);
out.writeOptionalWriteable(nestedIdentity);
out.writeLong(version);
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
out.writeZLong(seqNo);
out.writeVLong(primaryTerm);
}

View File

@ -140,7 +140,7 @@ public class TopHitsAggregationBuilder extends AbstractAggregationBuilder<TopHit
}
trackScores = in.readBoolean();
version = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_7_0_0)) {
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
seqNoAndPrimaryTerm = in.readBoolean();
}
}
@ -179,7 +179,7 @@ public class TopHitsAggregationBuilder extends AbstractAggregationBuilder<TopHit
}
out.writeBoolean(trackScores);
out.writeBoolean(version);
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
out.writeBoolean(seqNoAndPrimaryTerm);
}
}

View File

@ -250,7 +250,7 @@ public final class SearchSourceBuilder implements Writeable, ToXContentObject, R
timeout = in.readOptionalTimeValue();
trackScores = in.readBoolean();
version = in.readOptionalBoolean();
if (in.getVersion().onOrAfter(Version.V_7_0_0)) {
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
seqNoAndPrimaryTerm = in.readOptionalBoolean();
} else {
seqNoAndPrimaryTerm = null;
@ -318,7 +318,7 @@ public final class SearchSourceBuilder implements Writeable, ToXContentObject, R
out.writeOptionalTimeValue(timeout);
out.writeBoolean(trackScores);
out.writeOptionalBoolean(version);
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
out.writeOptionalBoolean(seqNoAndPrimaryTerm);
}
out.writeNamedWriteableList(extBuilders);