-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate most plugins to synchronous lifecycle (#89562)
* first pass * migrate more plugins * migrate yet more plugins * more oss plugins * fix test file * change Plugin signature on the client-side too * fix test types * migrate OSS client-side plugins * migrate OSS client-side test plugins * migrate xpack client-side plugins * revert fix attempt on fleet plugin * fix presentation start signature * fix yet another signature * add warnings for server-side async plugins in dev mode * remove unused import * fix isPromise * Add client-side deprecations * update migration examples * update generated doc * fix xpack unit tests * nit * (will be reverted) explicitly await for license to be ready in the auth hook * Revert "(will be reverted) explicitly await for license to be ready in the auth hook" This reverts commit fdf73fe * restore await on on promise contracts * Revert "(will be reverted) explicitly await for license to be ready in the auth hook" This reverts commit fdf73fe * Revert "restore await on on promise contracts" This reverts commit c5f2fe5 * add delay before starting tests in FTR * update deprecation ts doc * add explicit contract for monitoring setup * migrate monitoring plugin to sync * change plugin timeout to 10sec * use delay instead of silence
- Loading branch information
1 parent
2279c06
commit 3b3327d
Showing
114 changed files
with
1,000 additions
and
550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
docs/development/core/public/kibana-plugin-core-public.asyncplugin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) | ||
|
||
## AsyncPlugin interface | ||
|
||
> Warning: This API is now obsolete. | ||
> | ||
> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-public.plugin.md) | ||
> | ||
A plugin with asynchronous lifecycle methods. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface AsyncPlugin<TSetup = void, TStart = void, TPluginsSetup extends object = object, TPluginsStart extends object = object> | ||
``` | ||
|
||
## Methods | ||
|
||
| Method | Description | | ||
| --- | --- | | ||
| [setup(core, plugins)](./kibana-plugin-core-public.asyncplugin.setup.md) | | | ||
| [start(core, plugins)](./kibana-plugin-core-public.asyncplugin.start.md) | | | ||
| [stop()](./kibana-plugin-core-public.asyncplugin.stop.md) | | | ||
|
23 changes: 23 additions & 0 deletions
23
docs/development/core/public/kibana-plugin-core-public.asyncplugin.setup.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) > [setup](./kibana-plugin-core-public.asyncplugin.setup.md) | ||
|
||
## AsyncPlugin.setup() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
setup(core: CoreSetup<TPluginsStart, TStart>, plugins: TPluginsSetup): TSetup | Promise<TSetup>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| core | <code>CoreSetup<TPluginsStart, TStart></code> | | | ||
| plugins | <code>TPluginsSetup</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`TSetup | Promise<TSetup>` | ||
|
23 changes: 23 additions & 0 deletions
23
docs/development/core/public/kibana-plugin-core-public.asyncplugin.start.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) > [start](./kibana-plugin-core-public.asyncplugin.start.md) | ||
|
||
## AsyncPlugin.start() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| core | <code>CoreStart</code> | | | ||
| plugins | <code>TPluginsStart</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`TStart | Promise<TStart>` | ||
|
15 changes: 15 additions & 0 deletions
15
docs/development/core/public/kibana-plugin-core-public.asyncplugin.stop.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) > [stop](./kibana-plugin-core-public.asyncplugin.stop.md) | ||
|
||
## AsyncPlugin.stop() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
stop?(): void; | ||
``` | ||
<b>Returns:</b> | ||
`void` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
docs/development/core/server/kibana-plugin-core-server.asyncplugin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) | ||
|
||
## AsyncPlugin interface | ||
|
||
> Warning: This API is now obsolete. | ||
> | ||
> Asynchronous lifecycles are deprecated, and should be migrated to sync [plugin](./kibana-plugin-core-server.plugin.md) | ||
> | ||
A plugin with asynchronous lifecycle methods. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface AsyncPlugin<TSetup = void, TStart = void, TPluginsSetup extends object = object, TPluginsStart extends object = object> | ||
``` | ||
|
||
## Methods | ||
|
||
| Method | Description | | ||
| --- | --- | | ||
| [setup(core, plugins)](./kibana-plugin-core-server.asyncplugin.setup.md) | | | ||
| [start(core, plugins)](./kibana-plugin-core-server.asyncplugin.start.md) | | | ||
| [stop()](./kibana-plugin-core-server.asyncplugin.stop.md) | | | ||
|
23 changes: 23 additions & 0 deletions
23
docs/development/core/server/kibana-plugin-core-server.asyncplugin.setup.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) > [setup](./kibana-plugin-core-server.asyncplugin.setup.md) | ||
|
||
## AsyncPlugin.setup() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise<TSetup>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| core | <code>CoreSetup</code> | | | ||
| plugins | <code>TPluginsSetup</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`TSetup | Promise<TSetup>` | ||
|
23 changes: 23 additions & 0 deletions
23
docs/development/core/server/kibana-plugin-core-server.asyncplugin.start.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) > [start](./kibana-plugin-core-server.asyncplugin.start.md) | ||
|
||
## AsyncPlugin.start() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| core | <code>CoreStart</code> | | | ||
| plugins | <code>TPluginsStart</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`TStart | Promise<TStart>` | ||
|
15 changes: 15 additions & 0 deletions
15
docs/development/core/server/kibana-plugin-core-server.asyncplugin.stop.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [AsyncPlugin](./kibana-plugin-core-server.asyncplugin.md) > [stop](./kibana-plugin-core-server.asyncplugin.stop.md) | ||
|
||
## AsyncPlugin.stop() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
stop?(): void; | ||
``` | ||
<b>Returns:</b> | ||
`void` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.