Skip to content

Commit

Permalink
Sustainable Kibana Architecture: Move modules owned by `@elastic/obse…
Browse files Browse the repository at this point in the history
…rvability-ui` (elastic#202834)

## 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).

#### 1 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/observability-shared-plugin` |
`x-pack/solutions/observability/plugins/observability_shared` |




#### 3 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/observability-utils-browser` |
`x-pack/solutions/observability/packages/utils_browser` |
| `@kbn/observability-utils-common` |
`x-pack/solutions/observability/packages/utils_common` |
| `@kbn/observability-utils-server` |
`x-pack/solutions/observability/packages/utils_server` |


<details >
<summary>Updated references</summary>

```
./docs/developer/plugin-list.asciidoc
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./src/dev/storybook/aliases.ts
./tsconfig.base.json
./tsconfig.base.type_check.json
./tsconfig.refs.json
./x-pack/.i18nrc.json
./x-pack/solutions/observability/packages/utils_browser/jest.config.js
./x-pack/solutions/observability/packages/utils_common/jest.config.js
./x-pack/solutions/observability/packages/utils_server/jest.config.js
./x-pack/solutions/observability/plugins/observability_shared/jest.config.js
./x-pack/test/tsconfig.type_check.json
./yarn.lock
.github/CODEOWNERS
```

</details><details >
<summary>Updated relative paths</summary>

```
x-pack/solutions/observability/packages/utils_browser/jest.config.js:10
x-pack/solutions/observability/packages/utils_browser/tsconfig.json:2
x-pack/solutions/observability/packages/utils_common/jest.config.js:10
x-pack/solutions/observability/packages/utils_common/tsconfig.json:2
x-pack/solutions/observability/packages/utils_server/jest.config.js:10
x-pack/solutions/observability/packages/utils_server/tsconfig.json:2
x-pack/solutions/observability/plugins/observability_shared/jest.config.js:10
x-pack/solutions/observability/plugins/observability_shared/tsconfig.json:12
x-pack/solutions/observability/plugins/observability_shared/tsconfig.json:2
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:102
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:105
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:108
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:111
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:114
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:14
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:2
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:21
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:24
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:27
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:30
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:33
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:36
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:39
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:42
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:45
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:48
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:51
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:54
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:57
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:60
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:63
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:66
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:69
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:72
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:75
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:78
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:81
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:84
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:87
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:90
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:93
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:96
x-pack/solutions/observability/plugins/observability_shared/tsconfig.type_check.json:99
```

</details>

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: pgayvallet <[email protected]>
  • Loading branch information
3 people authored Dec 25, 2024
1 parent bc466ea commit 1e98a36
Show file tree
Hide file tree
Showing 184 changed files with 53 additions and 56 deletions.
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,6 @@ x-pack/packages/kbn-alerting-state-types @elastic/response-ops
x-pack/packages/kbn-random-sampling @elastic/kibana-visualizations
x-pack/packages/kbn-streams-schema @elastic/streams-program-team
x-pack/packages/kbn-synthetics-private-location @elastic/obs-ux-management-team
x-pack/packages/observability/observability_utils/observability_utils_browser @elastic/observability-ui
x-pack/packages/observability/observability_utils/observability_utils_common @elastic/observability-ui
x-pack/packages/observability/observability_utils/observability_utils_server @elastic/observability-ui
x-pack/packages/search/shared_ui @elastic/search-kibana
x-pack/packages/security/api_key_management @elastic/kibana-security
x-pack/packages/security/authorization_core @elastic/kibana-security
Expand Down Expand Up @@ -910,7 +907,6 @@ x-pack/plugins/observability_solution/apm/ftr_e2e @elastic/obs-ux-infra_services
x-pack/plugins/observability_solution/inventory @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/inventory/e2e @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/metrics_data_access @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/observability_shared @elastic/observability-ui
x-pack/plugins/observability_solution/profiling @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/profiling_data_access @elastic/obs-ux-infra_services-team
x-pack/plugins/reporting @elastic/appex-sharedux
Expand Down Expand Up @@ -942,6 +938,9 @@ x-pack/solutions/observability/packages/kbn-investigation-shared @elastic/obs-ux
x-pack/solutions/observability/packages/observability_ai/observability_ai_common @elastic/obs-ai-assistant
x-pack/solutions/observability/packages/observability_ai/observability_ai_server @elastic/obs-ai-assistant
x-pack/solutions/observability/packages/synthetics_test_data @elastic/obs-ux-management-team
x-pack/solutions/observability/packages/utils_browser @elastic/observability-ui
x-pack/solutions/observability/packages/utils_common @elastic/observability-ui
x-pack/solutions/observability/packages/utils_server @elastic/observability-ui
x-pack/solutions/observability/plugins/exploratory_view @elastic/obs-ux-management-team
x-pack/solutions/observability/plugins/infra @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team
x-pack/solutions/observability/plugins/investigate @elastic/obs-ux-management-team
Expand All @@ -953,6 +952,7 @@ x-pack/solutions/observability/plugins/observability_ai_assistant_management @el
x-pack/solutions/observability/plugins/observability_logs_explorer @elastic/obs-ux-logs-team
x-pack/solutions/observability/plugins/observability_onboarding @elastic/obs-ux-logs-team
x-pack/solutions/observability/plugins/observability_onboarding/e2e @elastic/obs-ux-logs-team
x-pack/solutions/observability/plugins/observability_shared @elastic/observability-ui
x-pack/solutions/observability/plugins/observability_solution/entities_data_access @elastic/obs-entities
x-pack/solutions/observability/plugins/observability_solution/entity_manager_app @elastic/obs-entities
x-pack/solutions/observability/plugins/serverless_observability @elastic/obs-ux-management-team
Expand Down Expand Up @@ -1447,7 +1447,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql
/x-pack/test_serverless/**/test_suites/observability/config.ts @elastic/observability-ui

# Observability onboarding tour
/x-pack/plugins/observability_solution/observability_shared/public/components/tour @elastic/appex-sharedux
/x-pack/solutions/observability/plugins/observability_shared/public/components/tour @elastic/appex-sharedux
/x-pack/test/functional/apps/infra/tour.ts @elastic/appex-sharedux

# Observability settings
Expand Down Expand Up @@ -2578,7 +2578,7 @@ x-pack/platform/plugins/private/translations/translations
x-pack/test/profiling_api_integration @elastic/obs-ux-infra_services-team

# Observability shared profiling
x-pack/plugins/observability_solution/observability_shared/public/components/profiling @elastic/obs-ux-infra_services-team
x-pack/solutions/observability/plugins/observability_shared/public/components/profiling @elastic/obs-ux-infra_services-team

# Shared UX
/x-pack/test_serverless/api_integration/test_suites/common/favorites @elastic/appex-sharedux # Assigned per https://github.com/elastic/kibana/pull/200985
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ Elastic.
|This plugin provides an onboarding framework for observability solutions: Logs and APM.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_solution/observability_shared/README.md[observabilityShared]
|{kib-repo}blob/{branch}/x-pack/solutions/observability/plugins/observability_shared/README.md[observabilityShared]
|A plugin that contains components and utilities shared by all Observability plugins.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,11 @@
"@kbn/observability-logs-overview": "link:x-pack/platform/packages/shared/observability/logs_overview",
"@kbn/observability-onboarding-plugin": "link:x-pack/solutions/observability/plugins/observability_onboarding",
"@kbn/observability-plugin": "link:x-pack/solutions/observability/plugins/observability",
"@kbn/observability-shared-plugin": "link:x-pack/plugins/observability_solution/observability_shared",
"@kbn/observability-shared-plugin": "link:x-pack/solutions/observability/plugins/observability_shared",
"@kbn/observability-synthetics-test-data": "link:x-pack/solutions/observability/packages/synthetics_test_data",
"@kbn/observability-utils-browser": "link:x-pack/packages/observability/observability_utils/observability_utils_browser",
"@kbn/observability-utils-common": "link:x-pack/packages/observability/observability_utils/observability_utils_common",
"@kbn/observability-utils-server": "link:x-pack/packages/observability/observability_utils/observability_utils_server",
"@kbn/observability-utils-browser": "link:x-pack/solutions/observability/packages/utils_browser",
"@kbn/observability-utils-common": "link:x-pack/solutions/observability/packages/utils_common",
"@kbn/observability-utils-server": "link:x-pack/solutions/observability/packages/utils_server",
"@kbn/oidc-provider-plugin": "link:x-pack/test/security_api_integration/plugins/oidc_provider",
"@kbn/open-telemetry-instrumented-plugin": "link:test/common/plugins/otel_metrics",
"@kbn/openapi-common": "link:src/platform/packages/shared/kbn-openapi-common",
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-babel-preset/styled_components_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ module.exports = {
/packages[\/\\]kbn-ui-shared-deps-src[\/\\]/,
/src[\/\\]plugins[\/\\]kibana_react[\/\\]/,
/x-pack[\/\\]platform[\/\\]packages[\/\\]shared[\/\\]kbn-elastic-assistant[\/\\]/,
/x-pack[\/\\]platform[\/\\]plugins[\/\\]shared[\/\\](fleet)[\/\\]/,
/x-pack[\/\\]plugins[\/\\]observability_solution[\/\\]observability_shared[\/\\]/,
/x-pack[\/\\]platform[\/\\]plugins[\/\\]shared[\/\\]fleet[\/\\]/,
/x-pack[\/\\]plugins[\/\\]security_solution[\/\\]/,
/x-pack[\/\\]solutions[\/\\]observability[\/\\]plugins[\/\\]observability_shared[\/\\]/,
/x-pack[\/\\]solutions[\/\\]observability[\/\\]plugins[\/\\]exploratory_view[\/\\]/,
/x-pack[\/\\]solutions[\/\\]observability[\/\\]plugins[\/\\]observability[\/\\]/,
/x-pack[\/\\]solutions[\/\\]observability[\/\\]plugins[\/\\]synthetics[\/\\]/,
Expand Down
2 changes: 1 addition & 1 deletion src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const storybookAliases = {
observability_ai_assistant_app:
'x-pack/solutions/observability/plugins/observability_ai_assistant_app/.storybook',
observability_inventory: 'x-pack/plugins/observability_solution/inventory/.storybook',
observability_shared: 'x-pack/plugins/observability_solution/observability_shared/.storybook',
observability_shared: 'x-pack/solutions/observability/plugins/observability_shared/.storybook',
observability_slo: 'x-pack/solutions/observability/plugins/slo/.storybook',
presentation: 'src/platform/plugins/shared/presentation_util/storybook',
random_sampling: 'x-pack/packages/kbn-random-sampling/.storybook',
Expand Down
16 changes: 8 additions & 8 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1348,16 +1348,16 @@
"@kbn/observability-onboarding-plugin/*": ["x-pack/solutions/observability/plugins/observability_onboarding/*"],
"@kbn/observability-plugin": ["x-pack/solutions/observability/plugins/observability"],
"@kbn/observability-plugin/*": ["x-pack/solutions/observability/plugins/observability/*"],
"@kbn/observability-shared-plugin": ["x-pack/plugins/observability_solution/observability_shared"],
"@kbn/observability-shared-plugin/*": ["x-pack/plugins/observability_solution/observability_shared/*"],
"@kbn/observability-shared-plugin": ["x-pack/solutions/observability/plugins/observability_shared"],
"@kbn/observability-shared-plugin/*": ["x-pack/solutions/observability/plugins/observability_shared/*"],
"@kbn/observability-synthetics-test-data": ["x-pack/solutions/observability/packages/synthetics_test_data"],
"@kbn/observability-synthetics-test-data/*": ["x-pack/solutions/observability/packages/synthetics_test_data/*"],
"@kbn/observability-utils-browser": ["x-pack/packages/observability/observability_utils/observability_utils_browser"],
"@kbn/observability-utils-browser/*": ["x-pack/packages/observability/observability_utils/observability_utils_browser/*"],
"@kbn/observability-utils-common": ["x-pack/packages/observability/observability_utils/observability_utils_common"],
"@kbn/observability-utils-common/*": ["x-pack/packages/observability/observability_utils/observability_utils_common/*"],
"@kbn/observability-utils-server": ["x-pack/packages/observability/observability_utils/observability_utils_server"],
"@kbn/observability-utils-server/*": ["x-pack/packages/observability/observability_utils/observability_utils_server/*"],
"@kbn/observability-utils-browser": ["x-pack/solutions/observability/packages/utils_browser"],
"@kbn/observability-utils-browser/*": ["x-pack/solutions/observability/packages/utils_browser/*"],
"@kbn/observability-utils-common": ["x-pack/solutions/observability/packages/utils_common"],
"@kbn/observability-utils-common/*": ["x-pack/solutions/observability/packages/utils_common/*"],
"@kbn/observability-utils-server": ["x-pack/solutions/observability/packages/utils_server"],
"@kbn/observability-utils-server/*": ["x-pack/solutions/observability/packages/utils_server/*"],
"@kbn/oidc-provider-plugin": ["x-pack/test/security_api_integration/plugins/oidc_provider"],
"@kbn/oidc-provider-plugin/*": ["x-pack/test/security_api_integration/plugins/oidc_provider/*"],
"@kbn/open-telemetry-instrumented-plugin": ["test/common/plugins/otel_metrics"],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"xpack.observabilityAiAssistantManagement": "solutions/observability/plugins/observability_ai_assistant_management",
"xpack.observabilityLogsExplorer": "solutions/observability/plugins/observability_logs_explorer",
"xpack.observability_onboarding": "solutions/observability/plugins/observability_onboarding",
"xpack.observabilityShared": "plugins/observability_solution/observability_shared",
"xpack.observabilityShared": "solutions/observability/plugins/observability_shared",
"xpack.observabilityLogsOverview": [
"platform/packages/shared/observability/logs_overview/src/components"
],
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/packages/observability/observability_utils/observability_utils_common'],
roots: ['<rootDir>/x-pack/solutions/observability/packages/utils_browser'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/packages/observability/observability_utils/observability_utils_server'],
roots: ['<rootDir>/x-pack/solutions/observability/packages/utils_common'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../../..',
roots: [
'<rootDir>/x-pack/packages/observability/observability_utils/observability_utils_browser',
],
roots: ['<rootDir>/x-pack/solutions/observability/packages/utils_server'],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

module.exports = {
preset: '@kbn/test',
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/solutions/observability/plugins/observability_shared'],
setupFiles: [
'<rootDir>/x-pack/solutions/observability/plugins/observability_shared/.storybook/jest_setup.js',
],
coverageDirectory:
'<rootDir>/target/kibana-coverage/jest/x-pack/solutions/observability/plugins/observability_shared',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/x-pack/solutions/observability/plugins/observability_shared/{common,public,server}/**/*.{js,ts,tsx}',
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export const useEsSearch = <DocumentSource extends unknown, TParams extends esty
});
});
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [...fnDeps]);

const { rawResponse } = response as any;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types"
},
Expand All @@ -9,7 +9,7 @@
"public/**/*.json",
"server/**/*",
"typings/**/*",
"../../../../typings/**/*",
"../../../../../typings/**/*",
".storybook/**/*"
],
"kbn_references": [
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6513,23 +6513,23 @@
version "0.0.0"
uid ""

"@kbn/observability-shared-plugin@link:x-pack/plugins/observability_solution/observability_shared":
"@kbn/observability-shared-plugin@link:x-pack/solutions/observability/plugins/observability_shared":
version "0.0.0"
uid ""

"@kbn/observability-synthetics-test-data@link:x-pack/solutions/observability/packages/synthetics_test_data":
version "0.0.0"
uid ""

"@kbn/observability-utils-browser@link:x-pack/packages/observability/observability_utils/observability_utils_browser":
"@kbn/observability-utils-browser@link:x-pack/solutions/observability/packages/utils_browser":
version "0.0.0"
uid ""

"@kbn/observability-utils-common@link:x-pack/packages/observability/observability_utils/observability_utils_common":
"@kbn/observability-utils-common@link:x-pack/solutions/observability/packages/utils_common":
version "0.0.0"
uid ""

"@kbn/observability-utils-server@link:x-pack/packages/observability/observability_utils/observability_utils_server":
"@kbn/observability-utils-server@link:x-pack/solutions/observability/packages/utils_server":
version "0.0.0"
uid ""

Expand Down

0 comments on commit 1e98a36

Please sign in to comment.