Sustainable Kibana Architecture: Move modules owned by @elastic/docs (#202416)

## 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. We kindly ask you to:

* Review the moved files, as some of them contain relative paths that
have been updated.
* Review the updated files, as some of them contain references 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
* We kindly ask you to:
* 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.


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

  | Id | Target folder |
  | -- | ------------- |
  | `@kbn/doc-links` | `src/platform/packages/shared/kbn-doc-links` |


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

```
./docs/upgrade-notes.asciidoc
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./src/core/tsconfig.type_check.json
./src/platform/packages/shared/kbn-doc-links/jest.config.js
./src/plugins/ai_assistant_management/selection/tsconfig.type_check.json
./tsconfig.base.json
./tsconfig.base.type_check.json
./tsconfig.refs.json
./x-pack/plugins/alerting/tsconfig.type_check.json
./x-pack/plugins/search_connectors/tsconfig.type_check.json
./x-pack/plugins/search_inference_endpoints/tsconfig.type_check.json
./x-pack/plugins/search_playground/tsconfig.type_check.json
./x-pack/plugins/security_solution/tsconfig.type_check.json
./x-pack/plugins/serverless_search/tsconfig.type_check.json
./x-pack/plugins/threat_intelligence/tsconfig.type_check.json
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>

```
src/platform/packages/shared/kbn-doc-links/jest.config.js:12
src/platform/packages/shared/kbn-doc-links/tsconfig.json:2
src/platform/packages/shared/kbn-doc-links/tsconfig.type_check.json:2
```
</details>
<details>
<summary>Script errors</summary>

```

```
</details>
This commit is contained in:
Gerard Soldevila 2024-12-05 14:54:58 +01:00 committed by GitHub
parent 94c5614366
commit b2d49b8beb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 10 additions and 10 deletions

2
.github/CODEOWNERS vendored
View file

@ -337,7 +337,6 @@ packages/kbn-dev-proc-runner @elastic/kibana-operations
packages/kbn-dev-utils @elastic/kibana-operations
packages/kbn-discover-contextual-components @elastic/obs-ux-logs-team @elastic/kibana-data-discovery
packages/kbn-discover-utils @elastic/kibana-data-discovery
packages/kbn-doc-links @elastic/docs
packages/kbn-docs-utils @elastic/kibana-operations
packages/kbn-dom-drag-drop @elastic/kibana-visualizations @elastic/kibana-data-discovery
packages/kbn-ebt-tools @elastic/kibana-core
@ -623,6 +622,7 @@ packages/shared-ux/storybook/config @elastic/appex-sharedux
packages/shared-ux/storybook/mock @elastic/appex-sharedux
packages/shared-ux/table_persist @elastic/appex-sharedux
src/core @elastic/kibana-core
src/platform/packages/shared/kbn-doc-links @elastic/docs
src/plugins/advanced_settings @elastic/appex-sharedux @elastic/kibana-management
src/plugins/ai_assistant_management/selection @elastic/obs-ai-assistant
src/plugins/bfetch @elastic/appex-sharedux

View file

@ -23,8 +23,8 @@ ADD INSTRUCTIONS FOR USERS LOOKING TO UPGRADE. HOW CAN THEY WORK AROUND THIS?
1. Copy and edit the template in the right section of this file. Most recent entries should be at the top of the section, search for sections using the text "[float]".
2. Edit the anchor ID [[REPO-PR]] of the template with proper values.
3. Don't hardcode the link to the new entry. Instead, make it available through the doc link service files:
- https://github.com/elastic/kibana/blob/main/packages/kbn-doc-links/src/get_doc_links.ts
- https://github.com/elastic/kibana/blob/main/packages/kbn-doc-links/src/types.ts
- https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts
- https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-doc-links/src/types.ts
The entry in the main links file should look like this:

View file

@ -460,7 +460,7 @@
"@kbn/discover-plugin": "link:src/plugins/discover",
"@kbn/discover-shared-plugin": "link:src/plugins/discover_shared",
"@kbn/discover-utils": "link:packages/kbn-discover-utils",
"@kbn/doc-links": "link:packages/kbn-doc-links",
"@kbn/doc-links": "link:src/platform/packages/shared/kbn-doc-links",
"@kbn/dom-drag-drop": "link:packages/kbn-dom-drag-drop",
"@kbn/ebt-tools": "link:packages/kbn-ebt-tools",
"@kbn/ecs-data-quality-dashboard": "link:x-pack/packages/security-solution/ecs_data_quality_dashboard",

View file

@ -9,6 +9,6 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-doc-links'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/platform/packages/shared/kbn-doc-links'],
};

View file

@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [

View file

@ -786,8 +786,8 @@
"@kbn/discover-shared-plugin/*": ["src/plugins/discover_shared/*"],
"@kbn/discover-utils": ["packages/kbn-discover-utils"],
"@kbn/discover-utils/*": ["packages/kbn-discover-utils/*"],
"@kbn/doc-links": ["packages/kbn-doc-links"],
"@kbn/doc-links/*": ["packages/kbn-doc-links/*"],
"@kbn/doc-links": ["src/platform/packages/shared/kbn-doc-links"],
"@kbn/doc-links/*": ["src/platform/packages/shared/kbn-doc-links/*"],
"@kbn/docs-utils": ["packages/kbn-docs-utils"],
"@kbn/docs-utils/*": ["packages/kbn-docs-utils/*"],
"@kbn/dom-drag-drop": ["packages/kbn-dom-drag-drop"],

View file

@ -5388,7 +5388,7 @@
version "0.0.0"
uid ""
"@kbn/doc-links@link:packages/kbn-doc-links":
"@kbn/doc-links@link:src/platform/packages/shared/kbn-doc-links":
version "0.0.0"
uid ""