Skip to content

Commit a50c7bc

Browse files
author
David Roberts
authored
[ML] Adjust BWC version for categorization model size stats (#52068)
The new stats will be available from 7.7.0, but the BWC tests in master need disabling until the backport PR is merged. Relates #51879 Relates #52009
1 parent 8506ff0 commit a50c7bc

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/process/autodetect/state/ModelSizeStats.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ public ModelSizeStats(StreamInput in) throws IOException {
200200
totalPartitionFieldCount = in.readVLong();
201201
bucketAllocationFailuresCount = in.readVLong();
202202
memoryStatus = MemoryStatus.readFromStream(in);
203-
// TODO change to 7.7.0 on backport
204-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
203+
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
205204
categorizedDocCount = in.readVLong();
206205
totalCategoryCount = in.readVLong();
207206
frequentCategoryCount = in.readVLong();
@@ -243,8 +242,7 @@ public void writeTo(StreamOutput out) throws IOException {
243242
out.writeVLong(totalPartitionFieldCount);
244243
out.writeVLong(bucketAllocationFailuresCount);
245244
memoryStatus.writeTo(out);
246-
// TODO change to 7.7.0 on backport
247-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
245+
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
248246
out.writeVLong(categorizedDocCount);
249247
out.writeVLong(totalCategoryCount);
250248
out.writeVLong(frequentCategoryCount);

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
"Test get old cluster job":
3+
- skip:
4+
version: "7.7.0 - "
5+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
36
- do:
47
ml.get_jobs:
58
job_id: old-cluster-job
@@ -37,6 +40,9 @@
3740

3841
---
3942
"Test get old cluster job's timing stats":
43+
- skip:
44+
version: "7.7.0 - "
45+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
4046
- do:
4147
ml.get_job_stats:
4248
job_id: old-cluster-job-with-ts
@@ -51,6 +57,9 @@
5157

5258
---
5359
"Test get old cluster categorization job":
60+
- skip:
61+
version: "7.7.0 - "
62+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
5463
- do:
5564
ml.get_jobs:
5665
job_id: old-cluster-categorization-job
@@ -88,6 +97,9 @@
8897

8998
---
9099
"Create a job in the mixed cluster and write some data":
100+
- skip:
101+
version: "7.7.0 - "
102+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
91103
- do:
92104
ml.put_job:
93105
job_id: mixed-cluster-job
@@ -140,7 +152,9 @@
140152

141153
---
142154
"Test job with pre 6.4 rules":
143-
155+
- skip:
156+
version: "7.7.0 - "
157+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
144158
- do:
145159
ml.get_jobs:
146160
job_id: job-with-old-rules

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ setup:
88

99
---
1010
"Test open old jobs":
11+
- skip:
12+
version: "7.7.0 - "
13+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
1114
- do:
1215
ml.open_job:
1316
job_id: old-cluster-job
@@ -111,6 +114,9 @@ setup:
111114

112115
---
113116
"Test get old cluster job's timing stats":
117+
- skip:
118+
version: "7.7.0 - "
119+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
114120
- do:
115121
ml.get_job_stats:
116122
job_id: old-cluster-job-with-ts
@@ -135,7 +141,9 @@ setup:
135141

136142
---
137143
"Test job with pre 6.4 rules":
138-
144+
- skip:
145+
version: "7.7.0 - "
146+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
139147
- do:
140148
ml.get_jobs:
141149
job_id: job-with-old-rules
@@ -145,7 +153,9 @@ setup:
145153

146154
---
147155
"Test get job with function shortcut should expand":
148-
156+
- skip:
157+
version: "7.7.0 - "
158+
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
149159
- do:
150160
ml.get_jobs:
151161
job_id: old-cluster-function-shortcut-expansion

0 commit comments

Comments
 (0)