[Deprecations service] Add requireRestart field (#106701)

This commit is contained in:
Ahmad Bamieh 2021-07-26 20:17:52 +03:00 committed by GitHub
parent 9ced2fb4ee
commit 2b7d1396e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 23 additions and 2 deletions

View file

@ -19,4 +19,5 @@ export interface DeprecationsDetails
| [documentationUrl](./kibana-plugin-core-server.deprecationsdetails.documentationurl.md) | <code>string</code> | |
| [level](./kibana-plugin-core-server.deprecationsdetails.level.md) | <code>'warning' &#124; 'critical' &#124; 'fetch_error'</code> | levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. |
| [message](./kibana-plugin-core-server.deprecationsdetails.message.md) | <code>string</code> | |
| [requireRestart](./kibana-plugin-core-server.deprecationsdetails.requirerestart.md) | <code>boolean</code> | |

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) &gt; [requireRestart](./kibana-plugin-core-server.deprecationsdetails.requirerestart.md)
## DeprecationsDetails.requireRestart property
<b>Signature:</b>
```typescript
requireRestart?: boolean;
```

View file

@ -18,6 +18,6 @@ export interface KibanaExecutionContext
| [description](./kibana-plugin-core-server.kibanaexecutioncontext.description.md) | <code>string</code> | human readable description. For example, a vis title, action name |
| [id](./kibana-plugin-core-server.kibanaexecutioncontext.id.md) | <code>string</code> | unique value to identify the source |
| [name](./kibana-plugin-core-server.kibanaexecutioncontext.name.md) | <code>string</code> | public name of a user-facing feature |
| [type](./kibana-plugin-core-server.kibanaexecutioncontext.type.md) | <code>string</code> | Kibana application initated an operation. Can be narrowed to an enum later. |
| [type](./kibana-plugin-core-server.kibanaexecutioncontext.type.md) | <code>string</code> | Kibana application initated an operation. |
| [url](./kibana-plugin-core-server.kibanaexecutioncontext.url.md) | <code>string</code> | in browser - url to navigate to a current page, on server - endpoint path, for task: task SO url |

View file

@ -4,7 +4,7 @@
## KibanaExecutionContext.type property
Kibana application initated an operation. Can be narrowed to an enum later.
Kibana application initated an operation.
<b>Signature:</b>

View file

@ -91,6 +91,7 @@ describe('DeprecationsService', () => {
"documentationUrl": "testDocUrl",
"level": "critical",
"message": "testMessage",
"requireRestart": true,
},
]
`);

View file

@ -156,6 +156,7 @@ export class DeprecationsService implements CoreService<InternalDeprecationsServ
message,
correctiveActions,
documentationUrl,
requireRestart: true,
};
});
},

View file

@ -37,6 +37,8 @@ export interface DeprecationsDetails {
deprecationType?: 'config' | 'feature';
/* (optional) link to the documentation for more details on the deprecation. */
documentationUrl?: string;
/* (optional) specify the fix for this deprecation requires a full kibana restart. */
requireRestart?: boolean;
/* corrective action needed to fix this deprecation. */
correctiveActions: {
/**

View file

@ -915,6 +915,8 @@ export interface DeprecationsDetails {
level: 'warning' | 'critical' | 'fetch_error';
// (undocumented)
message: string;
// (undocumented)
requireRestart?: boolean;
}
// @public

View file

@ -29,6 +29,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
},
deprecationType: 'config',
domainId: 'corePluginDeprecations',
requireRestart: true,
},
{
level: 'critical',
@ -40,6 +41,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
},
deprecationType: 'config',
domainId: 'corePluginDeprecations',
requireRestart: true,
},
{
level: 'critical',
@ -53,6 +55,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
documentationUrl: 'config-secret-doc-url',
deprecationType: 'config',
domainId: 'corePluginDeprecations',
requireRestart: true,
},
{
message: 'CorePluginDeprecationsPlugin is a deprecated feature for testing.',