mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[ML] Omit mml success message when mml checks are not run. (#18659)
Updates the behaviour of the job validation's model memory limit checks: The success messages success_mml gets only returned if the checks were actually run. This omits the success message for example in the single metric and population wizard.
This commit is contained in:
parent
d6e2464ff0
commit
92f05ee9b3
3 changed files with 3 additions and 4 deletions
|
@ -285,8 +285,7 @@ describe('ML - validateJob', () => {
|
|||
'job_id_valid',
|
||||
'detectors_function_not_empty',
|
||||
'index_fields_valid',
|
||||
'time_field_invalid',
|
||||
'success_mml'
|
||||
'time_field_invalid'
|
||||
]);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -103,7 +103,7 @@ describe('ML - validateModelMemoryLimit', () => {
|
|||
return validateModelMemoryLimit(callWithRequest, job, duration).then(
|
||||
(messages) => {
|
||||
const ids = messages.map(m => m.id);
|
||||
expect(ids).to.eql(['success_mml']);
|
||||
expect(ids).to.eql([]);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -120,7 +120,7 @@ export async function validateModelMemoryLimit(callWithRequest, job, duration) {
|
|||
}
|
||||
}
|
||||
|
||||
if (messages.length === 0) {
|
||||
if (messages.length === 0 && runCalcModelMemoryTest === true) {
|
||||
messages.push({ id: 'success_mml' });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue