Skip to content

Commit 1d4a9bb

Browse files
authored
[ML] fixing datafeed bwc tests (#52908)
Re-enables bwc tests and fixes up code after backport of #52793
1 parent 79ca586 commit 1d4a9bb

File tree

5 files changed

+4
-19
lines changed

5 files changed

+4
-19
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public DatafeedConfig(StreamInput in) throws IOException {
236236
} else {
237237
maxEmptySearches = null;
238238
}
239-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
239+
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
240240
indicesOptions = IndicesOptions.readIndicesOptions(in);
241241
} else {
242242
indicesOptions = SearchRequest.DEFAULT_INDICES_OPTIONS;
@@ -448,7 +448,7 @@ public void writeTo(StreamOutput out) throws IOException {
448448
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
449449
out.writeOptionalVInt(maxEmptySearches);
450450
}
451-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
451+
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
452452
indicesOptions.writeIndicesOptions(out);
453453
}
454454
}

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/datafeed/DatafeedUpdate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public DatafeedUpdate(StreamInput in) throws IOException {
156156
} else {
157157
maxEmptySearches = null;
158158
}
159-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
159+
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
160160
indicesOptions = in.readBoolean() ? IndicesOptions.readIndicesOptions(in) : null;
161161
} else {
162162
indicesOptions = null;
@@ -207,7 +207,7 @@ public void writeTo(StreamOutput out) throws IOException {
207207
if (out.getVersion().onOrAfter(Version.V_7_5_0)) {
208208
out.writeOptionalInt(maxEmptySearches);
209209
}
210-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
210+
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
211211
if (indicesOptions != null) {
212212
out.writeBoolean(true);
213213
indicesOptions.writeIndicesOptions(out);

x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/mixed_cluster/40_ml_datafeed_crud.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
setup:
2-
- skip:
3-
reason: "Waiting for backport of https://github.com/elastic/elasticsearch/pull/52793"
4-
version: all
5-
61
---
72
"Test old cluster datafeed without aggs":
8-
- skip:
9-
version: "all"
10-
reason: "Awaits fix: https://github.com/elastic/elasticsearch/issues/52739"
113
- do:
124
ml.get_datafeeds:
135
datafeed_id: old-cluster-datafeed-without-aggs

x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/old_cluster/40_ml_datafeed_crud.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
setup:
2-
- skip:
3-
reason: "Waiting for backport of https://github.com/elastic/elasticsearch/pull/52793"
4-
version: all
51
---
62
"Put job and datafeed without aggs in old cluster":
73

x-pack/qa/rolling-upgrade/src/test/resources/rest-api-spec/test/upgraded_cluster/40_ml_datafeed_crud.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
setup:
2-
- skip:
3-
reason: "Waiting for backport of https://github.com/elastic/elasticsearch/pull/52793"
4-
version: all
52
- do:
63
cluster.health:
74
wait_for_status: green

0 commit comments

Comments
 (0)