Skip to content

Commit

Permalink
Sustainable Kibana Architecture: Move modules owned by @elastic/docs (
Browse files Browse the repository at this point in the history
#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>
  • Loading branch information
gsoldevila authored Dec 5, 2024
1 parent 94c5614 commit b2d49b8
Show file tree
Hide file tree
Showing 16 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/upgrade-notes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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",
"types": [
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down

0 comments on commit b2d49b8

Please sign in to comment.