From a7797bc101962b6179dd6972e2556178c686ba12 Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Mon, 11 May 2020 13:56:00 +0200 Subject: [PATCH 1/2] [ML] Anomaly Detection: Fix test to reflect model memory limit change. (#65967) (#65984) Adapt jest test mocks to consider update introduced in #65652. --- .../ml/server/models/job_validation/job_validation.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts b/x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts index 9851f80a42d5bb..7d0634596b2312 100644 --- a/x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts +++ b/x-pack/plugins/ml/server/models/job_validation/job_validation.test.ts @@ -14,6 +14,13 @@ const callWithRequest: APICaller = (method: string) => { if (method === 'fieldCaps') { resolve({ fields: [] }); return; + } else if (method === 'ml.info') { + resolve({ + limits: { + effective_max_model_memory_limit: '100MB', + max_model_memory_limit: '1GB', + }, + }); } resolve({}); }) as Promise; From f59df009216bd7e194a4973d033bb01f2dc7ff52 Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Mon, 11 May 2020 14:05:14 +0100 Subject: [PATCH 2/2] [ML] Fixing watch creation (#65956) (#65980) --- .../components/create_watch_flyout/create_watch_service.js | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/create_watch_service.js b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/create_watch_service.js index 29e89022a55025..2a65ee06f2c2c1 100644 --- a/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/create_watch_service.js +++ b/x-pack/plugins/ml/public/application/jobs/jobs_list/components/create_watch_flyout/create_watch_service.js @@ -157,6 +157,7 @@ class CreateWatchService { id, type: 'json', isNew: false, // Set to false, as we want to allow watches to be overwritten. + isActive: true, watch, }, };