Skip to content

Commit

Permalink
[8.x] Update deprecations carried over from 8 (#195491) (#195654)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [Update deprecations carried over from 8
(#195491)](#195491)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Christiane (Tina)
Heiligers","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-09T17:12:52Z","message":"Update
deprecations carried over from 8 (#195491)\n\nFix
https://github.com/elastic/kibana/issues/142915\r\n\r\n### Risk
Matrix\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Third party plugin types throw type errors | Low | Low | type
checks\r\nwill error when using a deprecated type. Plugin authors should
extend\r\nthe supported types or define new ones inline |\r\n\r\n### For
maintainers\r\n\r\n- [X] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n(no
breaking
changes)","sha":"5ed13ee4a4b4325bae2f3e117a4fc400540fa542","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor","v8.16.0"],"title":"Update
deprecations carried over from
8","number":195491,"url":"https://github.com/elastic/kibana/pull/195491","mergeCommit":{"message":"Update
deprecations carried over from 8 (#195491)\n\nFix
https://github.com/elastic/kibana/issues/142915\r\n\r\n### Risk
Matrix\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Third party plugin types throw type errors | Low | Low | type
checks\r\nwill error when using a deprecated type. Plugin authors should
extend\r\nthe supported types or define new ones inline |\r\n\r\n### For
maintainers\r\n\r\n- [X] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n(no
breaking
changes)","sha":"5ed13ee4a4b4325bae2f3e117a4fc400540fa542"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195491","number":195491,"mergeCommit":{"message":"Update
deprecations carried over from 8 (#195491)\n\nFix
https://github.com/elastic/kibana/issues/142915\r\n\r\n### Risk
Matrix\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Third party plugin types throw type errors | Low | Low | type
checks\r\nwill error when using a deprecated type. Plugin authors should
extend\r\nthe supported types or define new ones inline |\r\n\r\n### For
maintainers\r\n\r\n- [X] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n(no
breaking
changes)","sha":"5ed13ee4a4b4325bae2f3e117a4fc400540fa542"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Christiane (Tina) Heiligers <[email protected]>
  • Loading branch information
kibanamachine and TinaHeiligers authored Oct 9, 2024
1 parent 884b861 commit 358b279
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export interface AppMountParameters<HistoryLocationState = unknown> {
* This string should not include the base path from HTTP.
*
* @deprecated Use {@link AppMountParameters.history} instead.
* @removeBy 8.8.0
* remove after https://github.com/elastic/kibana/issues/132600 is done
*
* @example
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface ElasticsearchServiceSetup {
setUnauthorizedErrorHandler: (handler: UnauthorizedErrorHandler) => void;

/**
* @deprecated
* @deprecated Can be removed when https://github.com/elastic/kibana/issues/119862 is done.
*/
legacy: {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { isConfigSchema } from '@kbn/config-schema';
import type { Logger } from '@kbn/logging';
import { type PluginOpaqueId, PluginType } from '@kbn/core-base-common';
import type {
AsyncPlugin,
Plugin,
PluginConfigDescriptor,
PluginInitializer,
Expand Down Expand Up @@ -58,8 +57,7 @@ export class PluginWrapper<

private instance?:
| Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart>
| PrebootPlugin<TSetup, TPluginsSetup>
| AsyncPlugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;
| PrebootPlugin<TSetup, TPluginsSetup>;

private readonly startDependencies$ = new Subject<[CoreStart, TPluginsStart, TStart]>();
public readonly startDependencies = firstValueFrom(this.startDependencies$);
Expand Down
1 change: 0 additions & 1 deletion packages/core/plugins/core-plugins-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export type {
PrebootPlugin,
Plugin,
AsyncPlugin,
PluginConfigDescriptor,
PluginConfigSchema,
PluginInitializer,
Expand Down
1 change: 0 additions & 1 deletion packages/core/plugins/core-plugins-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export type {
PrebootPlugin,
Plugin,
AsyncPlugin,
PluginConfigDescriptor,
PluginConfigSchema,
PluginInitializer,
Expand Down
24 changes: 1 addition & 23 deletions packages/core/plugins/core-plugins-server/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,26 +301,6 @@ export interface Plugin<
stop?(): MaybePromise<void>;
}

/**
* A plugin with asynchronous lifecycle methods.
*
* @deprecated Asynchronous lifecycles are deprecated, and should be migrated to sync {@link Plugin | plugin}
* @removeBy 8.8.0
* @public
*/
export interface AsyncPlugin<
TSetup = void,
TStart = void,
TPluginsSetup extends object = object,
TPluginsStart extends object = object
> {
setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise<TSetup>;

start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;

stop?(): MaybePromise<void>;
}

/**
* @public
*/
Expand Down Expand Up @@ -478,7 +458,5 @@ export type PluginInitializer<
> = (
core: PluginInitializerContext
) => Promise<
| Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart>
| PrebootPlugin<TSetup, TPluginsSetup>
| AsyncPlugin<TSetup, TStart, TPluginsSetup, TPluginsStart>
Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart> | PrebootPlugin<TSetup, TPluginsSetup>
>;
1 change: 0 additions & 1 deletion src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ export { PluginType } from '@kbn/core-base-common';
export type {
PrebootPlugin,
Plugin,
AsyncPlugin,
PluginConfigDescriptor,
PluginConfigSchema,
PluginInitializer,
Expand Down

0 comments on commit 358b279

Please sign in to comment.