Commit graph

18 commits

Author SHA1 Message Date
Gerard Soldevila
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>
2025-03-20 10:20:07 +01:00
Gerard Soldevila
a41badf964
SKA: Misc cleanup and enhancements (#212207)
## Summary

* Remove some old paths pointing to `packages/kbn-pm` (no longer
exists).
* ~Fix group and visibility for `@kbn/streams-app-wrapper-plugin`~.
(done in https://github.com/elastic/kibana/pull/212210)
* Update `scripts/relocate` logic with latest enhancements.
* Convert `@kbn/observability-synthetics-test-data` folder name to
camel-case (messes up with pre-commit hook).
2025-02-24 13:31:00 +00:00
Gerard Soldevila
6a7c904f92
SKA: Relocate "platform" packages that remain on /packages (#208704)
## Summary

The `/packages` folder at the root of the Kibana repository used to
contain a lot of packages.
In the context of SKA, they have been gradually moved to various
locations:
* `src/platform/packages`
* `x-pack/platform/packages`
* `src/core/packages`

Currently, only `devOnly: true` packages are left in this folder. This
comprises libraries for CLI scripts as well as testing utilities.

With this PR, we are moving ~half of these packages under
`src/platform/packages/(private|shared)/`.
In particular, we are moving those packages that are being used from
platform and/or solutions.

Since they are `"devOnly": true`, this means they are ONLY used from
tests, cypress tests, storybook configs, ./scripts/ folders inside some
modules, or other non-prod-time logic. Nonetheless, they are effectively
referenced from platform and/or solutions code, hence I decided they
should be placed under `platform` folders.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-24 11:03:30 +00:00
Gerard Soldevila
7b1c74a7a8
SKA: Follow-up relocations (#209477)
## Summary

* Categorise and move `@kbn/timelines-plugin` as _platform/shared_,
target location: `x-pack/platform/plugins/shared/timelines`.
This helps reduce the scope of the illegal dependencies from `osquery`
plugin towards _security/private_ code.
cc @tomsonpl 

* Simplify path and rename `@kbn/observability-alerting-rule-utils`
(platform/shared):
```
# Before 
@kbn/observability-alerting-rule-utils
x-pack/platform/packages/shared/observability/alerting_rule_utils/

# After
@kbn/alerting-rule-utils
x-pack/platform/packages/shared/alerting_rule_utils/
```

* Simplify path and rename `@kbn/observability-logs-overview`
(platform/shared):
```
# Before 
@kbn/observability-logs-overview
x-pack/platform/packages/shared/observability/logs_overview/

# After
@kbn/logs-overview
x-pack/platform/packages/shared/logs_overview/
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-05 19:53:36 +01:00
Gerard Soldevila
d5764b3ee8
SKA: Follow-up relocation (#207041)
## Summary

* @kbn/observability-ai-assistant-plugin: Simplify location
```
x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant
# becomes
x-pack/platform/plugins/shared/observability_ai_assistant
```

* @kbn/search-shared-ui: Simplify location
```
x-pack/solutions/search/packages/search/shared_ui
# becomes
x-pack/solutions/search/packages/shared_ui
```

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

```
./.github/paths-labeller.yml
./docs/developer/plugin-list.asciidoc
./package.json
./packages/kbn-relocate/utils/transforms.ts
./packages/kbn-ts-projects/config-paths.json
./src/dev/storybook/aliases.ts
./src/platform/packages/private/kbn-repo-packages/package-map.json
./tsconfig.base.json
./x-pack/.i18nrc.json
./x-pack/platform/plugins/shared/observability_ai_assistant/jest.config.js
./x-pack/solutions/search/packages/shared_ui/jest.config.js
./yarn.lock
.github/CODEOWNERS
```

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

```
x-pack/platform/plugins/shared/observability_ai_assistant/jest.config.js:10
x-pack/platform/plugins/shared/observability_ai_assistant/tsconfig.json:2
x-pack/platform/plugins/shared/observability_ai_assistant/tsconfig.json:7
x-pack/solutions/search/packages/shared_ui/jest.config.js:16
x-pack/solutions/search/packages/shared_ui/tsconfig.json:2
```

</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-27 20:02:57 +01:00
Gerard Soldevila
a3a2b2273f
SK: Relocate Script v7.2 (#207081)
## Summary

* Added a few transforms to simplify package paths.
* Fixed typo causing `.mdx` files to not be processed when replacing
references.
* Added preliminary support for `--healthcheck` (to check for broken
references to files and links).
2025-01-20 15:43:32 +01:00
Gerard Soldevila
3b42b80bce
SKA: Relocate Script v7.1 (#206233)
## Summary

* Fix an issue with the `--list` command failing the 1st run.
* Allow passing in no filters, and relocate "incorrect" modules (aka
modules that are not in the correct folder) in that case.
2025-01-10 10:47:47 +00:00
Gerard Soldevila
ca42d93bd4
SKA: Relocate Script v7 (#205732)
## Summary

Addresses the following:
* Simplify `isInTargetFolder`, and leverage existing
`calculateModuleTargetFolder`. It solves a bug with "current" location
being incorrectly determined, as we were using the `group` and
`visibility` inferred from path, rather than those in the manifest.
* Move the `pre-relocation` hook to BEFORE calculating the list of
modules. This allows to update a manifest to re-relocate a module (e.g.
when changing its group or visibility).
* Fix a bug that caused modules under `src/core/packages` to not be
considered in the "correct location".
* Fix a bug in the replace logic specific to `pipeline.ts`. We were
updating paths that we shouldn't have updated.
2025-01-07 19:27:36 +00:00
Gerard Soldevila
a8579bb41f
Make saved_objects_tagging plugin shared (#205695)
## Summary

So that it can be used from `streams_app` (o11y).
See  https://github.com/elastic/kibana/pull/204309

Steps to relocate:

1. Fetch latest `main`
2. Update the `group` and/or `visibility` in the module's manifest.
3. Run `node scripts/relocate --moveOnly
@kbn/saved-objects-tagging-plugin`
2025-01-07 18:15:17 +01:00
Gerard Soldevila
ac5e20d59c
SKA: Relocate script V6.2 (#205244)
## Summary

* Support packages that are currently placed under a `*/plugins/*`
folder (and viceversa).
* Transform (simplify) the following path:

```
src/platform/packages/shared/chart_expressions/common
# becomes
src/platform/packages/shared/chart-expressions-common
```

cc @markov00
2024-12-30 14:25:16 +01:00
Gerard Soldevila
19f24b31d9
SKA: Relocate script 6.1 (#205086)
## Summary

* Exclude example modules from relocation.
* Add an extra path transform to simplify packages folders.
2024-12-23 08:17:44 -06:00
Gerard Soldevila
49f7a8d43c
SKA: Relocate script v6 (#204929)
## Summary

* Update references to core packages in Bazel files, keeping the full
package id (thanks @afharo !)
* Show list of uncategorised packages in the plan
* Make remote detection case insensitive (cc @Dosant)

<img width="724" alt="image"
src="https://github.com/user-attachments/assets/9c53665b-e870-4b0d-894a-dd31c004b2f1"
/>
2024-12-19 08:07:25 -06:00
Gerard Soldevila
99a78366b0
SKA: Relocate script v5.1 (#204563)
## Summary

Replace references in `.xml` and `.snap` files too (thanks @kapral18)
2024-12-17 08:10:41 -06:00
Gerard Soldevila
641edad5bf
Sustainable Kibana Architecture: Relocate script v5 (#204461)
## Summary

* Automatically cherry-pick manual commits from the PR branch.
* Remove duplicate cleanup logic when `--pr <number>` is provided.
* Add a pre-relocate hook to allow for custom initial commits.
* Perform PR checkup before cleaning the local repo.
* Use `cli-table3` library to print nice tables with the summary of
modules being moved.
2024-12-17 04:04:48 -06:00
Gerard Soldevila
d18a44c042
Sustainable Kibana Architecture: Relocate script v4 (#204383)
## Summary

* Auto-detect "upstream" and "origin" remotes (instead of assuming their
names).
* Allow relocating modules that are already in a "sustainable" folder.
  * Filter out modules that are in the correct locations.
* Update the list of _modules to relocate_ to show only those modules
that are actually moved.

---------

Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
2024-12-16 09:45:31 -06:00
Gerard Soldevila
39732db6da
Sustainable Kibana Architecture: Relocate script v3 (#204239)
## Summary

* Added link to rebase guideline in PR description.
* Do not count `elasticmachine` commits as manual.
* Replace references in CODEOWNERS file manual section.
* Update README prerequisites.
2024-12-13 17:15:31 -06:00
Gerard Soldevila
748193d0a7
Sustainable Kibana Architecture: Relocate script v2 (#203887)
## Summary

Commits titles are self-explanatory
2024-12-12 04:10:50 -06:00
Gerard Soldevila
0b9179acbd
Sustainable Kibana Architecture: Add scripts/relocate CLI (beta) (#203803)
## Summary

Adds the `node scripts/relocate` functionality, that helps moving
modules to their intended locations, according to the _Sustainable
Kibana Architecture_.

Please refer to the README.md for further details and usage.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-11 17:10:37 +01:00