Skip to content

Commit

Permalink
[ML] Adjust BWC version for categorization model size stats
Browse files Browse the repository at this point in the history
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 elastic#51879
Relates elastic#52009
  • Loading branch information
droberts195 committed Feb 7, 2020
1 parent d03aae7 commit 149809c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ public ModelSizeStats(StreamInput in) throws IOException {
totalPartitionFieldCount = in.readVLong();
bucketAllocationFailuresCount = in.readVLong();
memoryStatus = MemoryStatus.readFromStream(in);
// TODO change to 7.7.0 on backport
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
categorizedDocCount = in.readVLong();
totalCategoryCount = in.readVLong();
frequentCategoryCount = in.readVLong();
Expand Down Expand Up @@ -243,8 +242,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(totalPartitionFieldCount);
out.writeVLong(bucketAllocationFailuresCount);
memoryStatus.writeTo(out);
// TODO change to 7.7.0 on backport
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
out.writeVLong(categorizedDocCount);
out.writeVLong(totalCategoryCount);
out.writeVLong(frequentCategoryCount);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
"Test get old cluster job":
- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.get_jobs:
job_id: old-cluster-job
Expand Down Expand Up @@ -37,6 +40,9 @@

---
"Test get old cluster job's timing stats":
- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.get_job_stats:
job_id: old-cluster-job-with-ts
Expand All @@ -51,6 +57,9 @@

---
"Test get old cluster categorization job":
- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.get_jobs:
job_id: old-cluster-categorization-job
Expand Down Expand Up @@ -88,6 +97,9 @@

---
"Create a job in the mixed cluster and write some data":
- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.put_job:
job_id: mixed-cluster-job
Expand Down Expand Up @@ -140,7 +152,9 @@

---
"Test job with pre 6.4 rules":

- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.get_jobs:
job_id: job-with-old-rules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ setup:

---
"Test open old jobs":
- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.open_job:
job_id: old-cluster-job
Expand Down Expand Up @@ -111,6 +114,9 @@ setup:

---
"Test get old cluster job's timing stats":
- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.get_job_stats:
job_id: old-cluster-job-with-ts
Expand All @@ -135,7 +141,9 @@ setup:

---
"Test job with pre 6.4 rules":

- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.get_jobs:
job_id: job-with-old-rules
Expand All @@ -145,7 +153,9 @@ setup:

---
"Test get job with function shortcut should expand":

- skip:
version: "7.7.0 - "
reason: waiting merge of https://github.com/elastic/elasticsearch/pull/52009
- do:
ml.get_jobs:
job_id: old-cluster-function-shortcut-expansion
Expand Down

0 comments on commit 149809c

Please sign in to comment.