mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 03:01:21 -04:00
## 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). #### 6 plugin(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/apm-data-access-plugin` | `x-pack/solutions/observability/plugins/apm_data_access` | | `@kbn/apm-plugin` | `x-pack/solutions/observability/plugins/apm` | | `@kbn/inventory-plugin` | `x-pack/solutions/observability/plugins/inventory` | | `@kbn/metrics-data-access-plugin` | `x-pack/solutions/observability/plugins/metrics_data_access` | | `@kbn/profiling-data-access-plugin` | `x-pack/solutions/observability/plugins/profiling_data_access` | | `@kbn/profiling-plugin` | `x-pack/solutions/observability/plugins/profiling` | #### 6 packages(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/apm-data-view` | `src/platform/packages/shared/kbn-apm-data-view` | | `@kbn/apm-types` | `x-pack/solutions/observability/packages/kbn-apm-types` | | `@kbn/apm-utils` | `src/platform/packages/shared/kbn-apm-utils` | | `@kbn/lens-embeddable-utils` | `src/platform/packages/shared/kbn-lens-embeddable-utils` | | `@kbn/profiling-utils` | `src/platform/packages/shared/kbn-profiling-utils` | | `@kbn/shared-svg` | `src/platform/packages/shared/kbn-shared-svg` | <details > <summary>Updated references</summary> ``` ./.buildkite/ftr_oblt_stateful_configs.yml ./.buildkite/scripts/steps/functional/apm_cypress.sh ./.buildkite/scripts/steps/functional/inventory_cypress.sh ./.buildkite/scripts/steps/functional/profiling_cypress.sh ./.eslintrc.js ./.github/paths-labeller.yml ./.gitignore ./docs/developer/plugin-list.asciidoc ./oas_docs/overlays/alerting.overlays.yaml ./oas_docs/scripts/merge_ess_oas.js ./oas_docs/scripts/merge_serverless_oas.js ./package.json ./packages/kbn-eslint-plugin-i18n/helpers/get_i18n_identifier_from_file_path.test.ts ./packages/kbn-eslint-plugin-telemetry/helpers/get_app_name.test.ts ./packages/kbn-repo-packages/package-map.json ./packages/kbn-ts-projects/config-paths.json ./src/dev/precommit_hook/casing_check_config.js ./src/dev/storybook/aliases.ts ./src/platform/packages/shared/kbn-lens-embeddable-utils/jest.config.js ./src/platform/packages/shared/kbn-profiling-utils/jest.config.js ./src/platform/packages/shared/kbn-shared-svg/jest.config.js ./tsconfig.base.json ./x-pack/.i18nrc.json ./x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts ./x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/queries/fetch_significant_term_p_values.ts ./x-pack/platform/packages/shared/ml/aiops_log_rate_analysis/queries/fetch_top_terms.ts ./x-pack/platform/plugins/private/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts ./x-pack/solutions/observability/plugins/apm/common/rules/apm_rule_types.ts ./x-pack/solutions/observability/plugins/apm/dev_docs/apm_queries.md ./x-pack/solutions/observability/plugins/apm/dev_docs/linting.md ./x-pack/solutions/observability/plugins/apm/dev_docs/local_setup.md ./x-pack/solutions/observability/plugins/apm/dev_docs/telemetry.md ./x-pack/solutions/observability/plugins/apm/dev_docs/testing.md ./x-pack/solutions/observability/plugins/apm/dev_docs/updating_functional_tests_archives.md ./x-pack/solutions/observability/plugins/apm/dev_docs/vscode_setup.md ./x-pack/solutions/observability/plugins/apm/ftr_e2e/README.md ./x-pack/solutions/observability/plugins/apm/jest.config.js ./x-pack/solutions/observability/plugins/apm/scripts/infer_route_return_types/index.ts ./x-pack/solutions/observability/plugins/apm/scripts/precommit.js ./x-pack/solutions/observability/plugins/apm/scripts/telemetry/main.ts ./x-pack/solutions/observability/plugins/apm_data_access/jest.config.js ./x-pack/solutions/observability/plugins/exploratory_view/common/annotations.ts ./x-pack/solutions/observability/plugins/inventory/README.md ./x-pack/solutions/observability/plugins/inventory/jest.config.js ./x-pack/solutions/observability/plugins/metrics_data_access/jest.config.js ./x-pack/solutions/observability/plugins/observability/common/annotations.ts ./x-pack/solutions/observability/plugins/profiling/README.md ./x-pack/solutions/observability/plugins/profiling/e2e/README.md ./x-pack/solutions/observability/plugins/profiling/jest.config.js ./x-pack/solutions/observability/plugins/profiling_data_access/jest.config.js ./x-pack/solutions/security/plugins/security_solution/server/utils/build_query/calculate_timeseries_interval.ts ./yarn.lock .github/CODEOWNERS ``` </details><details > <summary>Updated relative paths</summary> ``` src/platform/packages/shared/kbn-apm-data-view/tsconfig.json:2 src/platform/packages/shared/kbn-apm-utils/tsconfig.json:2 src/platform/packages/shared/kbn-lens-embeddable-utils/jest.config.js:12 src/platform/packages/shared/kbn-lens-embeddable-utils/tsconfig.json:2 src/platform/packages/shared/kbn-profiling-utils/jest.config.js:12 src/platform/packages/shared/kbn-profiling-utils/tsconfig.json:2 src/platform/packages/shared/kbn-shared-svg/jest.config.js:12 src/platform/packages/shared/kbn-shared-svg/tsconfig.json:2 x-pack/solutions/observability/packages/kbn-apm-types/tsconfig.json:2 x-pack/solutions/observability/plugins/apm/dev_docs/telemetry.md:17 x-pack/solutions/observability/plugins/apm/dev_docs/telemetry.md:22 x-pack/solutions/observability/plugins/apm/dev_docs/testing.md:130 x-pack/solutions/observability/plugins/apm/dev_docs/testing.md:222 x-pack/solutions/observability/plugins/apm/dev_docs/testing.md:78 x-pack/solutions/observability/plugins/apm/dev_docs/testing.md:96 x-pack/solutions/observability/plugins/apm/dev_docs/vscode_setup.md:42 x-pack/solutions/observability/plugins/apm/ftr_e2e/README.md:3 x-pack/solutions/observability/plugins/apm/ftr_e2e/tsconfig.json:2 x-pack/solutions/observability/plugins/apm/jest.config.js:12 x-pack/solutions/observability/plugins/apm/scripts/infer_route_return_types/index.ts:125 x-pack/solutions/observability/plugins/apm/scripts/precommit.js:15 x-pack/solutions/observability/plugins/apm/scripts/precommit.js:33 x-pack/solutions/observability/plugins/apm/scripts/precommit.js:38 x-pack/solutions/observability/plugins/apm/scripts/precommit.js:50 x-pack/solutions/observability/plugins/apm/scripts/shared/read_kibana_config.ts:16 x-pack/solutions/observability/plugins/apm/tsconfig.json:2 x-pack/solutions/observability/plugins/apm/tsconfig.json:7 x-pack/solutions/observability/plugins/apm_data_access/jest.config.js:12 x-pack/solutions/observability/plugins/apm_data_access/tsconfig.json:2 x-pack/solutions/observability/plugins/apm_data_access/tsconfig.json:6 x-pack/solutions/observability/plugins/inventory/e2e/tsconfig.json:2 x-pack/solutions/observability/plugins/inventory/jest.config.js:10 x-pack/solutions/observability/plugins/inventory/tsconfig.json:2 x-pack/solutions/observability/plugins/inventory/tsconfig.json:7 x-pack/solutions/observability/plugins/metrics_data_access/jest.config.js:10 x-pack/solutions/observability/plugins/metrics_data_access/tsconfig.json:2 x-pack/solutions/observability/plugins/metrics_data_access/tsconfig.json:6 x-pack/solutions/observability/plugins/profiling/README.md:52 x-pack/solutions/observability/plugins/profiling/e2e/README.md:3 x-pack/solutions/observability/plugins/profiling/e2e/tsconfig.json:11 x-pack/solutions/observability/plugins/profiling/e2e/tsconfig.json:2 x-pack/solutions/observability/plugins/profiling/jest.config.js:10 x-pack/solutions/observability/plugins/profiling/tsconfig.json:2 x-pack/solutions/observability/plugins/profiling_data_access/jest.config.js:12 x-pack/solutions/observability/plugins/profiling_data_access/tsconfig.json:2 ``` </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
import { getAppName } from './get_app_name';
|
|
|
|
const SYSTEMPATH = 'systemPath';
|
|
|
|
const testMap = [
|
|
['x-pack/solutions/observability/plugins/observability/foo/bar/baz/header_actions.tsx', 'o11y'],
|
|
['x-pack/solutions/observability/plugins/apm/baz/header_actions.tsx', 'apm'],
|
|
['x-pack/platform/plugins/shared/cases/public/components/foo.tsx', 'cases'],
|
|
[
|
|
'src/platform/packages/shared/kbn-alerts-ui-shared/src/alert_lifecycle_status_badge/index.tsx',
|
|
'kbnAlertsUiShared',
|
|
],
|
|
];
|
|
|
|
describe('Get App Name', () => {
|
|
test.each(testMap)(
|
|
'should get the responsible app name from a file path',
|
|
(path, expectedValue) => {
|
|
const appName = getAppName(`${SYSTEMPATH}/${path}`, SYSTEMPATH);
|
|
expect(appName).toBe(expectedValue);
|
|
}
|
|
);
|
|
});
|