Skip to content

Commit

Permalink
[ML] fixing datafeed bwc tests (#52908)
Browse files Browse the repository at this point in the history
Re-enables bwc tests and fixes up code after backport of #52793
  • Loading branch information
benwtrent authored Feb 28, 2020
1 parent 79ca586 commit 1d4a9bb
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public DatafeedConfig(StreamInput in) throws IOException {
} else {
maxEmptySearches = null;
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
indicesOptions = IndicesOptions.readIndicesOptions(in);
} else {
indicesOptions = SearchRequest.DEFAULT_INDICES_OPTIONS;
Expand Down Expand Up @@ -448,7 +448,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
out.writeOptionalVInt(maxEmptySearches);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
indicesOptions.writeIndicesOptions(out);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public DatafeedUpdate(StreamInput in) throws IOException {
} else {
maxEmptySearches = null;
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
indicesOptions = in.readBoolean() ? IndicesOptions.readIndicesOptions(in) : null;
} else {
indicesOptions = null;
Expand Down Expand Up @@ -207,7 +207,7 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
out.writeOptionalInt(maxEmptySearches);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
if (indicesOptions != null) {
out.writeBoolean(true);
indicesOptions.writeIndicesOptions(out);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
setup:
- skip:
reason: "Waiting for backport of https://github.com/elastic/elasticsearch/pull/52793"
version: all

---
"Test old cluster datafeed without aggs":
- skip:
version: "all"
reason: "Awaits fix: https://github.com/elastic/elasticsearch/issues/52739"
- do:
ml.get_datafeeds:
datafeed_id: old-cluster-datafeed-without-aggs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
setup:
- skip:
reason: "Waiting for backport of https://github.com/elastic/elasticsearch/pull/52793"
version: all
---
"Put job and datafeed without aggs in old cluster":

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
setup:
- skip:
reason: "Waiting for backport of https://github.com/elastic/elasticsearch/pull/52793"
version: all
- do:
cluster.health:
wait_for_status: green
Expand Down

0 comments on commit 1d4a9bb

Please sign in to comment.