forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Make plugin dependencies explicit; point out lifecycle incons…
…istencies (elastic#173297) > Changes identified using the script from elastic#171483 ## Summary The script from elastic#171483 can identify inconsistencies and untyped dependencies in Kibana plugins. This PR fixes the obvious: - `notifications` - move `actions` and `licensing` to `optionalPlugins`. - `serverless` - move `kibanaReact` to `requiredBundles`. - `serverlessObservability` - delete dead code and `kibanaReact` dependency. - `reporting` - move `esUiShared` and `embeddable` plugins to `requiredBundles`. - `uiActions` - remove `dataViews` dependency, (only a type is being used). - `urlDrilldowns` - move `uiActions` to `requiredBundles`. - Type all plugins using the `Setup` and `Start` generics on the core `Plugin` interface. - Consistently name them. - The exports needed to be named their original names; this will be addressed in follow up work, (to avoid pinging teams) - Add a `_` to unused parameters. ## Remaining Issues ### `licensing` and `licensingApiGuard` Both of these plugins introduce side-effects, rather than dependent logic. These need to be refactored to be consumed instead. <img width="735" alt="Screenshot 2023-12-13 at 10 08 00 AM" src="https://github.com/elastic/kibana/assets/297604/57916ffd-299d-4ca8-b796-dea2d06dca4a"> <img width="740" alt="Screenshot 2023-12-13 at 10 08 08 AM" src="https://github.com/elastic/kibana/assets/297604/a2af254f-adec-4bf9-869a-8acf34c0c9b4"> ## Resolved issues ### `reporting` ~~The `reporting` plugin requires `embeddable` and `esUiShared`, but it's unclear if these still apply, or if they are required for side-effects. Perhaps @tsullivan can help clarify?~~ Both are being used for static code. Moving to `requiredBundles`, and need to follow-up to create packages. <img width="800" alt="Screenshot 2023-12-13 at 10 08 23 AM" src="https://github.com/elastic/kibana/assets/297604/7629fb92-d28e-43de-bfeb-97410cff424e"> ### `uiActions` ~~The `uiActions` plugin requires `dataViews`. We need to determine if this is a side-effect dependency, or a direct dependency, and remove or refactor as necessary.~~ It's only using a type. Removing the dependency entirely, (`requiredBundles` requires actual code be used). <img width="622" alt="Screenshot 2023-12-13 at 10 08 33 AM" src="https://github.com/elastic/kibana/assets/297604/39916f05-dafc-4f42-b5d8-1abcb1267b5b"> ### urlDrilldown ~~The `urlDrilldown` plugin requires `uiActions`. We need to determine if this is a side-effect dependency, or a direct dependency, and remove or refactor as necessary.~~ Static code usage-- moving to `requiredBundles`. <img width="732" alt="Screenshot 2023-12-13 at 10 13 13 AM" src="https://github.com/elastic/kibana/assets/297604/af32f939-f866-483d-8dd0-aab962397dbb"> --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
b501281
commit 1c99f40
Showing
59 changed files
with
435 additions
and
198 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
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
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.