mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
The deprecations for ML snapshots that are too old and need upgrading are supposed to have a "Fix" button next to them. Unfortunately this disappeared when a message was reworded in elastic/elasticsearch#79387. This change adjusts the regex that the upgrade assistant uses to detect which deprecations to add the "Fix" button to so that it will match both "Model snapshot" and "model snapshot". The test data is also updated to match the new backend text. This change is designed to work with elastic/elasticsearch#81060. Co-authored-by: David Roberts <dave.roberts@elastic.co>
This commit is contained in:
parent
12d4882904
commit
e792a294f4
3 changed files with 4 additions and 5 deletions
|
@ -139,7 +139,7 @@ const getCorrectiveAction = (
|
|||
);
|
||||
const requiresReindexAction = /Index created before/.test(message);
|
||||
const requiresIndexSettingsAction = Boolean(indexSettingDeprecation);
|
||||
const requiresMlAction = /model snapshot/.test(message);
|
||||
const requiresMlAction = /[Mm]odel snapshot/.test(message);
|
||||
|
||||
if (requiresReindexAction) {
|
||||
return {
|
||||
|
|
|
@ -63,7 +63,7 @@ const verifySnapshotUpgrade = async (
|
|||
const { body: deprecations } = await esClient.asCurrentUser.migration.deprecations();
|
||||
|
||||
const mlSnapshotDeprecations = deprecations.ml_settings.filter((deprecation) => {
|
||||
return /model snapshot/.test(deprecation.message);
|
||||
return /[Mm]odel snapshot/.test(deprecation.message);
|
||||
});
|
||||
|
||||
// If there are no ML deprecations, we assume the deprecation was resolved successfully
|
||||
|
|
|
@ -49,9 +49,8 @@ describe('Status API', () => {
|
|||
{
|
||||
level: 'critical',
|
||||
message:
|
||||
'model snapshot [1] for job [deprecation_check_job] needs to be deleted or upgraded',
|
||||
details:
|
||||
'model snapshot [%s] for job [%s] supports minimum version [%s] and needs to be at least [%s]',
|
||||
'Model snapshot [1] for job [deprecation_check_job] has an obsolete minimum version [6.3.0].',
|
||||
details: 'Delete model snapshot [1] or update it to 7.0.0 or greater.',
|
||||
url: 'doc_url',
|
||||
correctiveAction: {
|
||||
type: 'mlSnapshot',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue