mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
25 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
adb4bdf8d8
|
SKA: Extract list of Kibana solutions into a dedicated package (#213353)
## Summary The intent is to have a centralised place to store the list of Kibana solutions and serverless project types. To that end, this PR creates a `@kbn/projects-solutions-groups` package. It also adds the new solution type `'chat'`. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
355a834659
|
SKA: Relocate /test to /src/platform/test (#210956)
## Summary Part of https://github.com/elastic/kibana-team/issues/1503 This is a first step towards the relocation of all the Kibana tests. The `/test/` folder at the root, which is in itself a package (`@kbn/test-suites-src`), and contains a large number of tests and test plugins, is being relocated under `src/platform/test`. All the tests under this folder should be related to common platform features, and they should not have any dependency towards solution-specific components or features. <details > <summary>Updated relative paths</summary> ``` src/platform/test/analytics/plugins/analytics_ftr_helpers/jest.config.js:12 src/platform/test/analytics/plugins/analytics_ftr_helpers/package.json:10 src/platform/test/analytics/plugins/analytics_ftr_helpers/package.json:11 src/platform/test/analytics/plugins/analytics_ftr_helpers/tsconfig.json:11 src/platform/test/analytics/plugins/analytics_ftr_helpers/tsconfig.json:2 src/platform/test/analytics/plugins/analytics_plugin_a/package.json:10 src/platform/test/analytics/plugins/analytics_plugin_a/package.json:11 src/platform/test/analytics/plugins/analytics_plugin_a/tsconfig.json:10 src/platform/test/analytics/plugins/analytics_plugin_a/tsconfig.json:2 src/platform/test/api_integration/jest.config.js:12 src/platform/test/common/plugins/newsfeed/tsconfig.json:2 src/platform/test/common/plugins/otel_metrics/tsconfig.json:2 src/platform/test/functional/jest.config.js:12 src/platform/test/harden/child_process.js:13 src/platform/test/harden/lodash_template.js:13 src/platform/test/harden/prototype.js:10 src/platform/test/health_gateway/plugins/status/tsconfig.json:2 src/platform/test/interactive_setup_api_integration/plugins/test_endpoints/tsconfig.json:2 src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json:11 src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json:12 src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json:11 src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json:2 src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/package.json:11 src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/package.json:12 src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/tsconfig.json:2 src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/tsconfig.json:9 src/platform/test/package/Vagrantfile:2 src/platform/test/plugin_functional/README.md:40 src/platform/test/plugin_functional/plugins/app_link_test/package.json:11 src/platform/test/plugin_functional/plugins/app_link_test/package.json:12 src/platform/test/plugin_functional/plugins/app_link_test/tsconfig.json:10 src/platform/test/plugin_functional/plugins/app_link_test/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_app_status/package.json:11 src/platform/test/plugin_functional/plugins/core_app_status/package.json:12 src/platform/test/plugin_functional/plugins/core_app_status/tsconfig.json:10 src/platform/test/plugin_functional/plugins/core_app_status/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/package.json:11 src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/package.json:12 src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/tsconfig.json:11 src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/package.json:11 src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/package.json:12 src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/tsconfig.json:11 src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_history_block/package.json:11 src/platform/test/plugin_functional/plugins/core_history_block/package.json:12 src/platform/test/plugin_functional/plugins/core_history_block/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_history_block/tsconfig.json:6 src/platform/test/plugin_functional/plugins/core_http/package.json:11 src/platform/test/plugin_functional/plugins/core_http/package.json:12 src/platform/test/plugin_functional/plugins/core_http/tsconfig.json:11 src/platform/test/plugin_functional/plugins/core_http/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_a/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_a/package.json:12 src/platform/test/plugin_functional/plugins/core_plugin_a/tsconfig.json:11 src/platform/test/plugin_functional/plugins/core_plugin_a/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_appleave/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_appleave/package.json:12 src/platform/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json:10 src/platform/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_b/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_b/package.json:12 src/platform/test/plugin_functional/plugins/core_plugin_b/tsconfig.json:11 src/platform/test/plugin_functional/plugins/core_plugin_b/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_chromeless/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_chromeless/package.json:12 src/platform/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json:10 src/platform/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_deep_links/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_deep_links/package.json:12 src/platform/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json:10 src/platform/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_deprecations/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_deprecations/package.json:12 src/platform/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json:11 src/platform/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_execution_context/package.json:10 src/platform/test/plugin_functional/plugins/core_plugin_execution_context/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_execution_context/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json:10 src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json:12 src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json:8 src/platform/test/plugin_functional/plugins/core_plugin_static_assets/package.json:11 src/platform/test/plugin_functional/plugins/core_plugin_static_assets/package.json:12 src/platform/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json:10 src/platform/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json:2 src/platform/test/plugin_functional/plugins/core_provider_plugin/package.json:11 src/platform/test/plugin_functional/plugins/core_provider_plugin/package.json:12 src/platform/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json:10 src/platform/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json:2 src/platform/test/plugin_functional/plugins/data_search/package.json:10 src/platform/test/plugin_functional/plugins/data_search/package.json:9 src/platform/test/plugin_functional/plugins/data_search/tsconfig.json:2 src/platform/test/plugin_functional/plugins/data_search/tsconfig.json:8 src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/package.json:10 src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/package.json:9 src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json:2 src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json:8 src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/package.json:11 src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/package.json:12 src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/tsconfig.json:10 src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/tsconfig.json:2 src/platform/test/plugin_functional/plugins/hardening/package.json:11 src/platform/test/plugin_functional/plugins/hardening/package.json:12 src/platform/test/plugin_functional/plugins/hardening/tsconfig.json:12 src/platform/test/plugin_functional/plugins/hardening/tsconfig.json:2 src/platform/test/plugin_functional/plugins/index_patterns/package.json:11 src/platform/test/plugin_functional/plugins/index_patterns/package.json:12 src/platform/test/plugin_functional/plugins/index_patterns/tsconfig.json:10 src/platform/test/plugin_functional/plugins/index_patterns/tsconfig.json:2 src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/package.json:11 src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/package.json:12 src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json:10 src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json:2 src/platform/test/plugin_functional/plugins/kbn_top_nav/package.json:11 src/platform/test/plugin_functional/plugins/kbn_top_nav/package.json:12 src/platform/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json:11 src/platform/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json:2 src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json:11 src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json:12 src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json:10 src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json:2 src/platform/test/plugin_functional/plugins/management_test_plugin/package.json:11 src/platform/test/plugin_functional/plugins/management_test_plugin/package.json:12 src/platform/test/plugin_functional/plugins/management_test_plugin/tsconfig.json:10 src/platform/test/plugin_functional/plugins/management_test_plugin/tsconfig.json:2 src/platform/test/plugin_functional/plugins/rendering_plugin/package.json:11 src/platform/test/plugin_functional/plugins/rendering_plugin/package.json:12 src/platform/test/plugin_functional/plugins/rendering_plugin/tsconfig.json:11 src/platform/test/plugin_functional/plugins/rendering_plugin/tsconfig.json:2 src/platform/test/plugin_functional/plugins/saved_object_export_transforms/package.json:11 src/platform/test/plugin_functional/plugins/saved_object_export_transforms/package.json:12 src/platform/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json:2 src/platform/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json:9 src/platform/test/plugin_functional/plugins/saved_object_import_warnings/package.json:11 src/platform/test/plugin_functional/plugins/saved_object_import_warnings/package.json:12 src/platform/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json:11 src/platform/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json:2 src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/package.json:11 src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/package.json:12 src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/tsconfig.json:2 src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/tsconfig.json:9 src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/package.json:11 src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/package.json:12 src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json:2 src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json:9 src/platform/test/plugin_functional/plugins/session_notifications/package.json:11 src/platform/test/plugin_functional/plugins/session_notifications/package.json:12 src/platform/test/plugin_functional/plugins/session_notifications/tsconfig.json:11 src/platform/test/plugin_functional/plugins/session_notifications/tsconfig.json:2 src/platform/test/plugin_functional/plugins/telemetry/package.json:11 src/platform/test/plugin_functional/plugins/telemetry/package.json:12 src/platform/test/plugin_functional/plugins/telemetry/tsconfig.json:2 src/platform/test/plugin_functional/plugins/telemetry/tsconfig.json:6 src/platform/test/plugin_functional/plugins/ui_settings_plugin/package.json:11 src/platform/test/plugin_functional/plugins/ui_settings_plugin/package.json:12 src/platform/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json:2 src/platform/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json:8 src/platform/test/plugin_functional/plugins/usage_collection/package.json:11 src/platform/test/plugin_functional/plugins/usage_collection/package.json:12 src/platform/test/plugin_functional/plugins/usage_collection/tsconfig.json:11 src/platform/test/plugin_functional/plugins/usage_collection/tsconfig.json:2 src/platform/test/server_integration/plugins/status_plugin_a/package.json:10 src/platform/test/server_integration/plugins/status_plugin_a/package.json:11 src/platform/test/server_integration/plugins/status_plugin_a/tsconfig.json:2 src/platform/test/server_integration/plugins/status_plugin_a/tsconfig.json:9 src/platform/test/server_integration/plugins/status_plugin_b/package.json:10 src/platform/test/server_integration/plugins/status_plugin_b/package.json:11 src/platform/test/server_integration/plugins/status_plugin_b/tsconfig.json:2 src/platform/test/server_integration/plugins/status_plugin_b/tsconfig.json:9 ``` </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
203bc28478
|
chore(NA): upgrade to webpack 5 (#191106)
### Summary - Closes #89741 This PR contains the resulting work of a massive effort that ports our on top bundler abstraction (called @kbn/optimizer) from Webpack v4 into Webpack v5. It's essential in terms of long term maintenance since v4 was not receiving updates any longer but will also unblock some new features that could be beneficial for our future DevEx endeavours. Next you can find a small list of all the accomplished tasks on this journey. ### Completed Tasks - [x] Upgrade dependencies to match the ones on webpack v5 - [x] Fix null-loader usages - [x] Fix raw-loader usages - [x] Fix file-loader usages - [x] Fix url-loader usages - [x] Fix `@kbn/optimizer-webpack-helpers` to support webpack v5 - [x] Adopt previous webpack v4 polyfill-all strategy with node-polyfill-webpack-plugin - [x] Fix theme-loader on @kbn/optimizer - [x] Migrate configurations and ad-hoc loader options on all webpack configs from v4 to v5 - [x] Fix @kbn/test jest resolver for file-loader cases - [x] Migrate public-path loader on UiSharedDeps - [x] Fix all usages of webpack-merge - [x] Migrate BundleRemoteModule - [x] Migrate BundleRemotesPlugin - [x] Correctly migrate PopulateBundleCachePlugin - [x] Correctly migrate BundleMetricsPlugin - [x] Check if the profiling plugins still work (--profile flag) - [x] Recover if possible the previous webpack v4 cacheGroup chunks rename to something like `data.plugin.chunk.0.js` - [x] Run `/ci` and make sure we get our first green CI, otherwise work on the errors until we do - [x] Profile and solve bottlenecks until we get a cold build performance similar to the one we had on webpack v4 (`node scripts/build_kibana_platform_plugins --no-cache`). - [x] OpenSSL Legacy Warnings: try to remove `--openssl-legacy-provider ` flags - [x] Add Webpack to Renovate config - [x] Explore removing `NodePolyfillPlugin` ([here](https://www.npmjs.com/package/node-polyfill-webpack-plugin)) and add each polyfill needed individually per each webpack config to check if we get smaller bundles. If we do it's better to go with the case by case need approach instead of deploying a bunch of polyfills with NodePolyfillPlugin. As another alternative, create a custom smaller plugin with only the union of all needed polyfills. - [x] Evaluate if we want to touch the resolutions on mainFields and conditionNames - [x] Understand why `@import 'src/core/public/mixins'` does not work anymore (not a problem, we should use relative paths anyway but we want to track why it changed from v4 to v5) - [x] BUG: Child compilers are having errors hidden and/or changed from error to warning - [x] Fix license check for [Artistic-2.0](https://spdx.org/licenses/Artistic-2.0.html) is the license for [domain-browser](https://github.com/bevry/domain-browser?tab=License-1-ov-file). This package is a dependency of [NodePolyfillPlugin](https://www.npmjs.com/package/node-polyfill-webpack-plugin). Artistic 2.0 license is [classified as yellow](https://github.com/elastic/open-source/blob/main/elastic-product-policy.md#yellow-list) and should only be used for dev dependencies. - [x] Make sure `resourceQuery: { not: /raw/ }` is not necessary on other webpack configs like storybook one - [x] Find what is being wrongly removed by usedExports optimization; hint: I believe it is identifying a lot of exports inside the sync entry of plugins as unused exports and removing them. Then `__kbnBootstrap__` can't be found - [x] Rebalance @kbn/optimizer pickMaxWorkerCount - [x] Re-open the issue to fix sass-warnings [#190345](https://github.com/elastic/kibana/issues/190345) or downgrade sass-loader to v10 - [x] Remove previous esm no parse rules - [x] Confirm esm support is working - [x] Confirm console override is needed - [x] Confirm react prod builds on ui shared deps for distributable - [x] Remove customization for [xyflow](https://github.com/xyflow/xyflow) from webpack configs - [x] Clean all the code - [x] Make sure collected metrics from stats are still aligned with what we were collecting before; also verify if the modules used for optimizer caches etc are well generated (@kbn/node-libs-browser) - [x] Fix watch performance --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Brad White <brad.white@elastic.co> |
||
|
a382d35dd2
|
Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-visualizations (#202754)
## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > * This PR has been auto-generated. > * Any manual contributions will be lost if the 'relocate' script is re-run. > * Try to obtain the missing reviews / approvals before applying manual fixes, and/or keep your changes in a .patch / git stash. > * Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. Are you trying to rebase this PR to solve merge conflicts? Please follow the steps describe [here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E). #### 29 plugin(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/charts-plugin` | `src/platform/plugins/shared/charts` | | `@kbn/data-plugin` | `src/platform/plugins/shared/data` | | `@kbn/event-annotation-listing-plugin` | `src/platform/plugins/private/event_annotation_listing` | | `@kbn/event-annotation-plugin` | `src/platform/plugins/private/event_annotation` | | `@kbn/expression-gauge-plugin` | `src/platform/plugins/shared/chart_expressions/expression_gauge` | | `@kbn/expression-heatmap-plugin` | `src/platform/plugins/shared/chart_expressions/expression_heatmap` | | `@kbn/expression-legacy-metric-vis-plugin` | `src/platform/plugins/shared/chart_expressions/expression_legacy_metric` | | `@kbn/expression-metric-vis-plugin` | `src/platform/plugins/shared/chart_expressions/expression_metric` | | `@kbn/expression-partition-vis-plugin` | `src/platform/plugins/shared/chart_expressions/expression_partition_vis` | | `@kbn/expression-tagcloud-plugin` | `src/platform/plugins/shared/chart_expressions/expression_tagcloud` | | `@kbn/expression-xy-plugin` | `src/platform/plugins/shared/chart_expressions/expression_xy` | | `@kbn/expressions-plugin` | `src/platform/plugins/shared/expressions` | | `@kbn/graph-plugin` | `x-pack/platform/plugins/private/graph` | | `@kbn/lens-plugin` | `x-pack/platform/plugins/shared/lens` | | `@kbn/unified-search-plugin` | `src/platform/plugins/shared/unified_search` | | `@kbn/url-forwarding-plugin` | `src/platform/plugins/private/url_forwarding` | | `@kbn/vis-default-editor-plugin` | `src/platform/plugins/private/vis_default_editor` | | `@kbn/vis-type-gauge-plugin` | `src/platform/plugins/private/vis_types/gauge` | | `@kbn/vis-type-heatmap-plugin` | `src/platform/plugins/private/vis_types/heatmap` | | `@kbn/vis-type-metric-plugin` | `src/platform/plugins/private/vis_types/metric` | | `@kbn/vis-type-pie-plugin` | `src/platform/plugins/private/vis_types/pie` | | `@kbn/vis-type-table-plugin` | `src/platform/plugins/private/vis_types/table` | | `@kbn/vis-type-tagcloud-plugin` | `src/platform/plugins/private/vis_types/tagcloud` | | `@kbn/vis-type-timelion-plugin` | `src/platform/plugins/private/vis_types/timelion` | | `@kbn/vis-type-timeseries-plugin` | `src/platform/plugins/shared/vis_types/timeseries` | | `@kbn/vis-type-vega-plugin` | `src/platform/plugins/private/vis_types/vega` | | `@kbn/vis-type-vislib-plugin` | `src/platform/plugins/private/vis_types/vislib` | | `@kbn/vis-type-xy-plugin` | `src/platform/plugins/private/vis_types/xy` | | `@kbn/visualizations-plugin` | `src/platform/plugins/shared/visualizations` | #### 18 packages(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/calculate-width-from-char-count` | `src/platform/packages/shared/kbn-calculate-width-from-char-count` | | `@kbn/chart-expressions-common` | `src/platform/packages/shared/chart-expressions-common` | | `@kbn/chart-icons` | `src/platform/packages/shared/kbn-chart-icons` | | `@kbn/coloring` | `src/platform/packages/shared/kbn-coloring` | | `@kbn/data-service` | `src/platform/packages/shared/kbn-data-service` | | `@kbn/dom-drag-drop` | `src/platform/packages/shared/kbn-dom-drag-drop` | | `@kbn/event-annotation-common` | `src/platform/packages/shared/kbn-event-annotation-common` | | `@kbn/event-annotation-components` | `src/platform/packages/shared/kbn-event-annotation-components` | | `@kbn/interpreter` | `src/platform/packages/shared/kbn-interpreter` | | `@kbn/lens-formula-docs` | `src/platform/packages/private/kbn-lens-formula-docs` | | `@kbn/managed-content-badge` | `src/platform/packages/private/kbn-managed-content-badge` | | `@kbn/random-sampling` | `x-pack/platform/packages/private/kbn-random-sampling` | | `@kbn/sort-predicates` | `src/platform/packages/shared/kbn-sort-predicates` | | `@kbn/timelion-grammar` | `src/platform/packages/private/kbn-timelion-grammar` | | `@kbn/tinymath` | `src/platform/packages/private/kbn-tinymath` | | `@kbn/transpose-utils` | `src/platform/packages/private/kbn-transpose-utils` | | `@kbn/visualization-ui-components` | `src/platform/packages/shared/kbn-visualization-ui-components` | | `@kbn/visualization-utils` | `src/platform/packages/shared/kbn-visualization-utils` | <details > <summary>Updated references</summary> ``` ./.eslintignore ./.eslintrc.js ./.github/paths-labeller.yml ./.i18nrc.json ./docs/developer/architecture/core/elasticsearch-service.asciidoc ./docs/developer/architecture/development-visualize-index.asciidoc ./docs/developer/best-practices/index.asciidoc ./docs/developer/plugin-list.asciidoc ./examples/search_examples/public/plugin.ts ./package.json ./packages/kbn-docs-utils/src/build_api_declarations/extract_import_refs.test.ts ./packages/kbn-docs-utils/src/utils.ts ./packages/kbn-eslint-plugin-i18n/helpers/get_i18n_identifier_from_file_path.test.ts ./packages/kbn-repo-source-classifier/src/repo_source_classifier.ts ./packages/kbn-ts-projects/config-paths.json ./src/dev/build/tasks/package_json/find_used_dependencies.ts ./src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js ./src/dev/code_coverage/ingest_coverage/__tests__/mocks/team_assign_mock.txt ./src/dev/code_coverage/ingest_coverage/__tests__/transforms.test.js ./src/dev/code_coverage/ingest_coverage/integration_tests/mocks/jest-combined/bulk-data.json ./src/dev/storybook/aliases.ts ./src/platform/packages/private/kbn-lens-formula-docs/jest.config.js ./src/platform/packages/private/kbn-managed-content-badge/jest.config.js ./src/platform/packages/private/kbn-repo-packages/package-map.json ./src/platform/packages/private/kbn-tinymath/README.md ./src/platform/packages/private/kbn-tinymath/jest.config.js ./src/platform/packages/private/kbn-transpose-utils/jest.config.js ./src/platform/packages/shared/chart-expressions-common/jest.config.js ./src/platform/packages/shared/kbn-calculate-width-from-char-count/jest.config.js ./src/platform/packages/shared/kbn-chart-icons/jest.config.js ./src/platform/packages/shared/kbn-coloring/jest.config.js ./src/platform/packages/shared/kbn-data-service/jest.config.js ./src/platform/packages/shared/kbn-dom-drag-drop/jest.config.js ./src/platform/packages/shared/kbn-event-annotation-common/jest.config.js ./src/platform/packages/shared/kbn-event-annotation-components/jest.config.js ./src/platform/packages/shared/kbn-interpreter/jest.config.js ./src/platform/packages/shared/kbn-sort-predicates/jest.config.js ./src/platform/packages/shared/kbn-visualization-ui-components/jest.config.js ./src/platform/packages/shared/kbn-visualization-utils/jest.config.js ./src/platform/plugins/private/event_annotation/jest.config.js ./src/platform/plugins/private/event_annotation_listing/jest.config.js ./src/platform/plugins/private/url_forwarding/jest.config.js ./src/platform/plugins/private/vis_default_editor/jest.config.js ./src/platform/plugins/private/vis_types/gauge/jest.config.js ./src/platform/plugins/private/vis_types/heatmap/jest.config.js ./src/platform/plugins/private/vis_types/metric/jest.config.js ./src/platform/plugins/private/vis_types/pie/jest.config.js ./src/platform/plugins/private/vis_types/table/jest.config.js ./src/platform/plugins/private/vis_types/tagcloud/jest.config.js ./src/platform/plugins/private/vis_types/timelion/jest.config.js ./src/platform/plugins/private/vis_types/vega/jest.config.js ./src/platform/plugins/private/vis_types/vislib/jest.config.js ./src/platform/plugins/private/vis_types/xy/jest.config.js ./src/platform/plugins/shared/chart_expressions/expression_gauge/jest.config.js ./src/platform/plugins/shared/chart_expressions/expression_heatmap/jest.config.js ./src/platform/plugins/shared/chart_expressions/expression_legacy_metric/jest.config.js ./src/platform/plugins/shared/chart_expressions/expression_metric/jest.config.js ./src/platform/plugins/shared/chart_expressions/expression_partition_vis/jest.config.js ./src/platform/plugins/shared/chart_expressions/expression_tagcloud/jest.config.js ./src/platform/plugins/shared/chart_expressions/expression_xy/jest.config.js ./src/platform/plugins/shared/charts/jest.config.js ./src/platform/plugins/shared/custom_integrations/jest.config.js ./src/platform/plugins/shared/data/jest.config.js ./src/platform/plugins/shared/expressions/README.asciidoc ./src/platform/plugins/shared/expressions/jest.config.js ./src/platform/plugins/shared/unified_search/jest.config.js ./src/platform/plugins/shared/vis_types/timeseries/jest.config.js ./src/platform/plugins/shared/visualizations/jest.config.js ./src/plugins/vis_types/timeseries/public/application/components/aggs/math.js ./tsconfig.base.json ./tsconfig.base.type_check.json ./tsconfig.refs.json ./x-pack/.i18nrc.json ./x-pack/platform/packages/private/kbn-random-sampling/jest.config.js ./x-pack/platform/packages/private/ml/date_utils/src/date_utils.ts ./x-pack/platform/plugins/private/graph/README.md ./x-pack/platform/plugins/private/graph/jest.config.js ./x-pack/platform/plugins/private/graph/public/components/venn_diagram/vennjs/index.ts ./x-pack/platform/plugins/private/watcher/public/legacy/time_buckets.js ./x-pack/platform/plugins/shared/cases/public/components/markdown_editor/use_plugins.ts ./x-pack/platform/plugins/shared/lens/jest.config.js ./x-pack/platform/plugins/shared/lens/readme.md ./x-pack/platform/plugins/shared/lens/server/embeddable/make_lens_embeddable_factory.ts ./x-pack/platform/plugins/shared/lens/server/migrations/saved_object_migrations.ts ./x-pack/platform/plugins/shared/lens/tsconfig.type_check.json ./x-pack/platform/plugins/shared/ml/public/application/explorer/explorer_charts/explorer_charts_container.js ./x-pack/platform/plugins/shared/ml/public/application/services/field_format_service.ts ./x-pack/platform/plugins/shared/ml/public/application/util/chart_utils.js ./x-pack/solutions/observability/plugins/observability/common/utils/get_inspect_response.ts ./x-pack/solutions/observability/plugins/observability_shared/common/utils/get_inspect_response.ts ./x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/autocomplete/index.mock.ts ./x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/fields/index.mock.ts ./x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/filter_field_to_list/index.ts ./x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.test.ts ./x-pack/solutions/security/packages/kbn-securitysolution-autocomplete/src/hooks/use_field_value_autocomplete/index.ts ./x-pack/solutions/security/packages/kbn-securitysolution-list-utils/src/helpers/index.ts ./x-pack/solutions/security/plugins/security_solution/public/common/hooks/use_app_toasts.ts ./x-pack/solutions/security/plugins/security_solution/server/lib/timeline/constants.ts ./x-pack/solutions/security/plugins/timelines/public/hooks/use_app_toasts.ts ./yarn.lock .github/CODEOWNERS ``` </details><details > <summary>Updated relative paths</summary> ``` src/platform/packages/private/kbn-lens-formula-docs/jest.config.js:12 src/platform/packages/private/kbn-lens-formula-docs/tsconfig.json:2 src/platform/packages/private/kbn-managed-content-badge/jest.config.js:12 src/platform/packages/private/kbn-managed-content-badge/tsconfig.json:2 src/platform/packages/private/kbn-timelion-grammar/tsconfig.json:2 src/platform/packages/private/kbn-tinymath/jest.config.js:12 src/platform/packages/private/kbn-tinymath/tsconfig.json:2 src/platform/packages/private/kbn-transpose-utils/jest.config.js:12 src/platform/packages/private/kbn-transpose-utils/tsconfig.json:2 src/platform/packages/shared/chart-expressions-common/jest.config.js:12 src/platform/packages/shared/chart-expressions-common/tsconfig.json:2 src/platform/packages/shared/kbn-calculate-width-from-char-count/jest.config.js:12 src/platform/packages/shared/kbn-calculate-width-from-char-count/tsconfig.json:2 src/platform/packages/shared/kbn-chart-icons/jest.config.js:12 src/platform/packages/shared/kbn-chart-icons/tsconfig.json:2 src/platform/packages/shared/kbn-coloring/jest.config.js:12 src/platform/packages/shared/kbn-coloring/tsconfig.json:2 src/platform/packages/shared/kbn-data-service/jest.config.js:12 src/platform/packages/shared/kbn-data-service/tsconfig.json:2 src/platform/packages/shared/kbn-dom-drag-drop/jest.config.js:12 src/platform/packages/shared/kbn-dom-drag-drop/tsconfig.json:2 src/platform/packages/shared/kbn-event-annotation-common/jest.config.js:12 src/platform/packages/shared/kbn-event-annotation-common/tsconfig.json:2 src/platform/packages/shared/kbn-event-annotation-components/jest.config.js:12 src/platform/packages/shared/kbn-event-annotation-components/tsconfig.json:2 src/platform/packages/shared/kbn-interpreter/jest.config.js:12 src/platform/packages/shared/kbn-interpreter/tsconfig.json:2 src/platform/packages/shared/kbn-sort-predicates/jest.config.js:12 src/platform/packages/shared/kbn-sort-predicates/tsconfig.json:2 src/platform/packages/shared/kbn-visualization-ui-components/jest.config.js:12 src/platform/packages/shared/kbn-visualization-ui-components/tsconfig.json:2 src/platform/packages/shared/kbn-visualization-utils/jest.config.js:12 src/platform/packages/shared/kbn-visualization-utils/tsconfig.json:2 src/platform/plugins/private/event_annotation/jest.config.js:12 src/platform/plugins/private/event_annotation/tsconfig.json:2 src/platform/plugins/private/event_annotation_listing/jest.config.js:12 src/platform/plugins/private/event_annotation_listing/tsconfig.json:2 src/platform/plugins/private/url_forwarding/jest.config.js:12 src/platform/plugins/private/url_forwarding/tsconfig.json:2 src/platform/plugins/private/vis_default_editor/README.md:8 src/platform/plugins/private/vis_default_editor/jest.config.js:12 src/platform/plugins/private/vis_default_editor/tsconfig.json:2 src/platform/plugins/private/vis_types/gauge/jest.config.js:12 src/platform/plugins/private/vis_types/gauge/tsconfig.json:2 src/platform/plugins/private/vis_types/heatmap/jest.config.js:12 src/platform/plugins/private/vis_types/heatmap/tsconfig.json:2 src/platform/plugins/private/vis_types/metric/jest.config.js:12 src/platform/plugins/private/vis_types/metric/tsconfig.json:2 src/platform/plugins/private/vis_types/pie/jest.config.js:12 src/platform/plugins/private/vis_types/pie/tsconfig.json:2 src/platform/plugins/private/vis_types/table/jest.config.js:12 src/platform/plugins/private/vis_types/table/tsconfig.json:2 src/platform/plugins/private/vis_types/tagcloud/jest.config.js:12 src/platform/plugins/private/vis_types/tagcloud/tsconfig.json:2 src/platform/plugins/private/vis_types/timelion/jest.config.js:12 src/platform/plugins/private/vis_types/timelion/tsconfig.json:2 src/platform/plugins/private/vis_types/vega/jest.config.js:12 src/platform/plugins/private/vis_types/vega/tsconfig.json:2 src/platform/plugins/private/vis_types/vislib/jest.config.js:12 src/platform/plugins/private/vis_types/vislib/tsconfig.json:2 src/platform/plugins/private/vis_types/xy/jest.config.js:12 src/platform/plugins/private/vis_types/xy/tsconfig.json:2 src/platform/plugins/shared/chart_expressions/expression_gauge/jest.config.js:12 src/platform/plugins/shared/chart_expressions/expression_gauge/tsconfig.json:2 src/platform/plugins/shared/chart_expressions/expression_heatmap/jest.config.js:12 src/platform/plugins/shared/chart_expressions/expression_heatmap/tsconfig.json:2 src/platform/plugins/shared/chart_expressions/expression_legacy_metric/.storybook/main.js:17 src/platform/plugins/shared/chart_expressions/expression_legacy_metric/jest.config.js:12 src/platform/plugins/shared/chart_expressions/expression_legacy_metric/tsconfig.json:2 src/platform/plugins/shared/chart_expressions/expression_metric/.storybook/main.js:17 src/platform/plugins/shared/chart_expressions/expression_metric/jest.config.js:12 src/platform/plugins/shared/chart_expressions/expression_metric/tsconfig.json:2 src/platform/plugins/shared/chart_expressions/expression_partition_vis/jest.config.js:12 src/platform/plugins/shared/chart_expressions/expression_partition_vis/tsconfig.json:2 src/platform/plugins/shared/chart_expressions/expression_tagcloud/jest.config.js:12 src/platform/plugins/shared/chart_expressions/expression_tagcloud/tsconfig.json:2 src/platform/plugins/shared/chart_expressions/expression_xy/jest.config.js:12 src/platform/plugins/shared/chart_expressions/expression_xy/tsconfig.json:2 src/platform/plugins/shared/charts/jest.config.js:12 src/platform/plugins/shared/charts/tsconfig.json:2 src/platform/plugins/shared/data/jest.config.js:12 src/platform/plugins/shared/data/tsconfig.json:13 src/platform/plugins/shared/data/tsconfig.json:2 src/platform/plugins/shared/expressions/jest.config.js:12 src/platform/plugins/shared/expressions/tsconfig.json:2 src/platform/plugins/shared/unified_search/jest.config.js:12 src/platform/plugins/shared/unified_search/tsconfig.json:2 src/platform/plugins/shared/vis_types/timeseries/jest.config.js:12 src/platform/plugins/shared/vis_types/timeseries/tsconfig.json:11 src/platform/plugins/shared/vis_types/timeseries/tsconfig.json:2 src/platform/plugins/shared/visualizations/jest.config.js:12 src/platform/plugins/shared/visualizations/tsconfig.json:2 src/platform/plugins/shared/visualizations/tsconfig.json:6 x-pack/platform/packages/private/kbn-random-sampling/jest.config.js:10 x-pack/platform/packages/private/kbn-random-sampling/tsconfig.json:2 x-pack/platform/plugins/private/graph/jest.config.js:10 x-pack/platform/plugins/private/graph/tsconfig.json:13 x-pack/platform/plugins/private/graph/tsconfig.json:3 x-pack/platform/plugins/shared/lens/jest.config.js:10 x-pack/platform/plugins/shared/lens/tsconfig.json:2 x-pack/platform/plugins/shared/lens/tsconfig.json:6 ``` </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
81993a10b9
|
Sustainable Kibana Architecture: Fix group inference logic: add missing packages folders (#201758)
## Summary After relocating modules (plugins and packages) to their new folders, according to the _Sustainable Kibana Architecture_ design, their groups will be inferred based on their path. The logic was taking into account plugins' folders, but not packages' folders. This PR fixes that. |
||
|
310d922f13
|
[kbn-scout] initial package implementation (playwright-test POC) (#194006)
## Summary This PR introduces a new package, **kbn-scout**, designed to streamline the setup and execution of Playwright tests for Kibana. The `kbn-scout` package consolidates server management and testing capabilities by wrapping both the Kibana/Elasticsearch server launcher and the Playwright test runner. It includes: - Test and worker-scoped fixtures for reliable setup across test suites - Page objects combined into the fixture for Kibana UI interactions - Configurations for seamless test execution in both local and CI environments (`Cloud` execution is out of scope) - This package aims to simplify test setup and enhance modularity, making it easier to create, run, and maintain deployment-agnostic tests, that are located in the plugin they actually test. Tests example is available in `x-pack/plugins/discover_enhanced` plugin under `ui_tests` folder How to run: 1) As a single script (servers + tests): ``` node scripts/scout_test.js --config=x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts --serverless=es ``` 2) Start servers first ``` node scripts/scout_start_servers.js --serverless=es ``` then run tests: ``` npx playwright test --config=x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts ``` if you have Playwright plugin in IDEA, just use it to run tests files --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
b24fdf5d3f
|
Sustainable Kibana Architecture: Categorise straightforward packages (#199630)
## Summary This PR is part of the Kibana Sustainable Architecture effort. The goal is to start categorising Kibana packages into _generic platform_ (`group: "platform"`) vs _solution-specific_. ``` group?: 'search' | 'security' | 'observability' | 'platform' visibility?: 'private' | 'shared' ``` Uncategorised modules are considered to be `group: 'common', visibility: 'shared'` by default. We want to prevent code from solution A to depend on code from solution B. Thus, the rules are pretty simple: * Modules can only depend on: * Modules in the same group * OR modules with 'shared' visibility * Modules in `'observability', 'security', 'search'` groups are mandatorily `visibility: "private"`. Long term, the goal is to re-organise packages into dedicated folders, e.g.: ``` x-pack/platform/plugins/private x-pack/observability/packages ``` For this first wave, we have categorised packages that seem "straightforward": * Any packages that have: * at least one dependant module * all dependants belong to the same group * Categorise all Core packages: * `@kbn/core-...-internal` => _platform/private_ * everything else => _platform/shared_ * Categorise as _platform/shared_ those packages that: * Have at least one dependant in the _platform_ group. * Don't have any `devOnly: true` dependants. ### What we ask from you, as CODEOWNERS of the _package manifests_, is that you confirm that the categorisation is correct: * `group: "platform", visibility: "private"` if it's a package that should only be used from platform code, not from any solution code. It will be loaded systematically in all serverless flavors, but solution plugins and packages won't be able to `import` from it. * `group: "platform", visibility: "shared"` if it's a package that can be consumed by both platform and solutions code. It will be loaded systematically in all serverless flavors, and anybody can import / use code from it. * `group: "observability" | "security" | "search", visibility: "private"` if it's a package that is intented to be used exclusively from a given solution. It won't be accessible nor loaded from other solutions nor platform code. Please refer to [#kibana-sustainable-architecture](https://elastic.slack.com/archives/C07TCKTA22E) for any related questions. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
2a085e103a
|
Add ESLINT constraints to detect inter-group dependencies (#194810)
## Summary Addresses https://github.com/elastic/kibana-team/issues/1175 As part of the **Sustainable Kibana Architecture** initiative, this PR sets the foundation to start classifying plugins in isolated groups, matching our current solutions / project types: * It adds support for the following fields in the packages' manifests (kibana.jsonc): * `group?: 'search' | 'security' | 'observability' | 'platform' | 'common'` * `visibility?: 'private' | 'shared'` * It proposes a folder structure to automatically infer groups: ```javascript 'src/platform/plugins/shared': { group: 'platform', visibility: 'shared', }, 'src/platform/plugins/internal': { group: 'platform', visibility: 'private', }, 'x-pack/platform/plugins/shared': { group: 'platform', visibility: 'shared', }, 'x-pack/platform/plugins/internal': { group: 'platform', visibility: 'private', }, 'x-pack/solutions/observability/plugins': { group: 'observability', visibility: 'private', }, 'x-pack/solutions/security/plugins': { group: 'security', visibility: 'private', }, 'x-pack/solutions/search/plugins': { group: 'search', visibility: 'private', }, ``` * If a plugin is moved to one of the specific locations above, the group and visibility in the manifest (if specified) must match those inferred from the path. * Plugins that are not relocated are considered: `group: 'common', visibility: 'shared'` by default. As soon as we specify a custom `group`, the ESLINT rules will check violations against dependencies / dependants. The ESLINT rules are pretty simple: * Plugins can only depend on: * Plugins in the same group * OR plugins with `'shared'` visibility * Plugins in `'observability', 'security', 'search'` groups are mandatorily `'private'`. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
b6287708f6
|
Adds AGPL 3.0 license (#192025)
Updates files outside of x-pack to be triple-licensed under Elastic License 2.0, AGPL 3.0, or SSPL 1.0. |
||
|
11b750b10a
|
Minimize shared-common everywhere (#188606)
## Summary  At the moment, our package generator creates all packages with the type `shared-common`. This means that we cannot enforce boundaries between server-side-only code and the browser, and vice-versa. - [x] I started fixing `packages/core/*` - [x] It took me to fixing `src/core/` type to be identified by the `plugin` pattern (`public` and `server` directories) vs. a package (either common, or single-scoped) - [x] Unsurprisingly, this extended to packages importing core packages hitting the boundaries eslint rules. And other packages importing the latter. - [x] Also a bunch of `common` logic that shouldn't be so _common_ 🙃 ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
3a040a170a
|
chore(NA): rename journeys folder into journeys_e2e inside x-pack/performance to correctly classify journey e2e files (#178340)
The source code classifier we currently have was incorrectly classifying e2e journey files as `non-package` instead of `tests or mocks` as it was not using the name standards we used for FTR files. We could have created a `functional-tests` package for the performance folder (which is what we want to do in the future) but because we don't have the feature to create ownerless packages it would not be easy to find a given owner for that folder. As such I'm just opting for a second solution which is applying the same name standards to this journeys folder as we have for FTR and changing a little the classifier to recognise it. This should fix the problem found at https://github.com/elastic/kibana/pull/178017. Co-authored-by: Alex Szabo <alex.szabo@elastic.co> |
||
|
a17e307dc8
|
fix(NA): source classifier to indentify xml as static files (#164109)
This PR fixes a bug in the source classifier as it is currently not identifying xml as a static file. As part of this I've also identified a TODO in the source classifier related with the evaluating order. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
1b85815402
|
[packages] migrate all plugins to packages (#148130)
Fixes https://github.com/elastic/kibana/issues/149344 This PR migrates all plugins to packages automatically. It does this using `node scripts/lint_packages` to automatically migrate `kibana.json` files to `kibana.jsonc` files. By doing this automatically we can simplify many build and testing procedures to only support packages, and not both "packages" and "synthetic packages" (basically pointers to plugins). The majority of changes are in operations related code, so we'll be having operations review this before marking it ready for review. The vast majority of the code owners are simply pinged because we deleted all `kibana.json` files and replaced them with `kibana.jsonc` files, so we plan on leaving the PR ready-for-review for about 24 hours before merging (after feature freeze), assuming we don't have any blockers (especially from @elastic/kibana-core since there are a few core specific changes, though the majority were handled in #149370). --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
376bed5d16
|
implement "plugin" package type (#149370)
This PR updates the core discovery logic to support loading plugins from packages. This logic is additive, so that the existing plugins in the repo and third-party plugins can continue to be loaded via the existing mechanism, but with https://github.com/elastic/kibana/pull/148130 we will be automatically migrating all plugins in the repo to packages, which will use this logic. The logic is already in-use in that PR, and was developed there, but extracted here for easier review. The logic is relatively simple, where a list of packages in the repo are attached to the core `Env` and then filtered by core before converting all plugin packages to `PluginWrapper`. The `PluginWrapper` still exposes the plugin manifest to the rest of the code, and it is used in many places, so rather than making changes to the `PluginWrapper` I'm faking a legacy plugin manifest with the plugin package manifest. @elastic/kibana-core: I'm going to need some help identifying what we need to get test coverage for. This is a pretty simple addition to the core IMO, and if it didn't work then nothing would work, so I'm pretty confident in it, but would still appreciate your feedback. |
||
|
ebd6a4ec8e
|
fix(NA): @kbn/cli-dev-mode nonPackageMatcher patterns (#148971)
This PR fixes the pattern matchers for `nonPackageMatcher` into our new watcher logic as well as correctly classifies all the files found inside the `screenshotting plugin` |
||
|
99013bdab8
|
switch out chokidar for @parcel/watcher in dev cli (#148924)
After the recent changes to limit the dev-cli watcher to relevant packages, the watcher started logging tons of unnecessary changes, and in some cases breaking based on the state of the repo. I have seen this happen with Chokidar before, and I'm not convinced we'll be able to fix it, so instead I decided to swap it out with `@parcel/watcher`, which is a conceptually simpler implementation that automatically batches changes and watches an entire directory, rather than tons of unique directories/files. This new implementation is conceptually simpler, and because of the design of the `@parcel/watcher` module I was pushed to reuse the `RepoSourceClassifier` to determine if we should restart the server based on a specific change. This means we now have a single source of truth for test files and the like (the classifier will tell us if a file is a test file, regardless of where it exists in the repo). Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
afb09ccf8a
|
Transpile packages on demand, validate all TS projects (#146212)
## Dearest Reviewers 👋 I've been working on this branch with @mistic and @tylersmalley and we're really confident in these changes. Additionally, this changes code in nearly every package in the repo so we don't plan to wait for reviews to get in before merging this. If you'd like to have a concern addressed, please feel free to leave a review, but assuming that nobody raises a blocker in the next 24 hours we plan to merge this EOD pacific tomorrow, 12/22. We'll be paying close attention to any issues this causes after merging and work on getting those fixed ASAP. 🚀 --- The operations team is not confident that we'll have the time to achieve what we originally set out to accomplish by moving to Bazel with the time and resources we have available. We have also bought ourselves some headroom with improvements to babel-register, optimizer caching, and typescript project structure. In order to make sure we deliver packages as quickly as possible (many teams really want them), with a usable and familiar developer experience, this PR removes Bazel for building packages in favor of using the same JIT transpilation we use for plugins. Additionally, packages now use `kbn_references` (again, just copying the dx from plugins to packages). Because of the complex relationships between packages/plugins and in order to prepare ourselves for automatic dependency detection tools we plan to use in the future, this PR also introduces a "TS Project Linter" which will validate that every tsconfig.json file meets a few requirements: 1. the chain of base config files extended by each config includes `tsconfig.base.json` and not `tsconfig.json` 1. the `include` config is used, and not `files` 2. the `exclude` config includes `target/**/*` 3. the `outDir` compiler option is specified as `target/types` 1. none of these compiler options are specified: `declaration`, `declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`, `paths` 4. all references to other packages/plugins use their pkg id, ie: ```js // valid { "kbn_references": ["@kbn/core"] } // not valid { "kbn_references": [{ "path": "../../../src/core/tsconfig.json" }] } ``` 5. only packages/plugins which are imported somewhere in the ts code are listed in `kbn_references` This linter is not only validating all of the tsconfig.json files, but it also will fix these config files to deal with just about any violation that can be produced. Just run `node scripts/ts_project_linter --fix` locally to apply these fixes, or let CI take care of automatically fixing things and pushing the changes to your PR. > **Example:** [` |
||
|
e41569b4a6
|
fix(NA): wrongly spread stripInternal and rootDir configs across packages (#144463)
* chore(NA): remove overrides for rootDir on packages * chore(NA): replace './target_types' with 'target_types' on packages * chore(NA): removes stripInternal false configs * chore(NA): remove unused strip internals |
||
|
52f2b33a07
|
[auto] migrate existing plugin/package configs | ||
|
b41a07f85a
|
[eslint/imports/no-boundary-crossing] don't allow package tests to import outside of packages (#142166) | ||
|
32491462a9
|
add kibana.jsonc files to existing packages (#138965)
* [packages] add kibana.jsonc files * auto-migrate to kibana.jsonc * support interactive pkg id selection too * remove old codeowners entry * skip codeowners generation when .github/CODEOWNERS doesn't exist * fall back to format validation if user is offline * update question style * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
1cbf83f73c
|
chore(NA): remove src folder requirement from packages (part 2) (#138476)
* refact(NA): apply root_input_dir=src to each already created pkg * refact(NA): update package generator * fix(NA): correctly use rootDir * fix(NA): use root input dir on latest introduced pkgs for jsts_transpiler macro * chore(NA): merge with main * chore(NA): first attempt to complete removal of src folder on a small group of pkgs * Revert "chore(NA): first attempt to complete removal of src folder on a small group of pkgs" This reverts commit |
||
|
df8b62aa98
|
chore(NA): allow packages to not have an obligation for a src folder on packages (#138038)
* refact(NA): apply root_input_dir=src to each already created pkg * refact(NA): update package generator * fix(NA): correctly use rootDir * fix(NA): use root input dir on latest introduced pkgs for jsts_transpiler macro * chore(NA): merge with main Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> |
||
|
bebec37f04
|
[eslint] fix and skip violations for cross-boundary imports (#136911) | ||
|
20f9cf9fd4
|
[eslint] add rule for validating cross-boundary imports (#137116) |