Skip to content

Commit

Permalink
[8.x] Sustainable Kibana Architecture: Move modules owned by `@elasti…
Browse files Browse the repository at this point in the history
…c/security-detections-response` (#202847) (#204833)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Sustainable Kibana Architecture: Move modules owned by
`@elastic/security-detections-response`
(#202847)](#202847)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-18T20:10:50Z","message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-detections-response` (#202847)\n\n##
Summary\r\n\r\nThis PR aims at relocating some of the Kibana modules
(plugins and\r\npackages) into a new folder structure, according to the
_Sustainable\r\nKibana Architecture_ initiative.\r\n\r\n>
[!IMPORTANT]\r\n> * We kindly ask you to:\r\n> * Manually fix the errors
in the error section below (if there are\r\nany).\r\n> * Search for the
`packages[\\/\\\\]` and `plugins[\\/\\\\]` patterns in the\r\nsource
code (Babel and Eslint config files), and update
them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
1 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/rule-data-utils`
|\r\n`src/platform/packages/shared/kbn-rule-data-utils`
|\r\n\r\n\r\n<details >\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./package.json\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/shared/kbn-rule-data-utils/jest.config.js\r\n./src/platform/plugins/shared/discover/tsconfig.type_check.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/examples/triggers_actions_ui_example/tsconfig.type_check.json\r\n./x-pack/packages/observability/alert_details/tsconfig.type_check.json\r\n./x-pack/packages/observability/alerting_test_data/tsconfig.type_check.json\r\n./x-pack/platform/plugins/private/monitoring/tsconfig.type_check.json\r\n./x-pack/plugins/alerting/tsconfig.type_check.json\r\n./x-pack/plugins/cases/tsconfig.type_check.json\r\n./x-pack/plugins/ml/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/apm/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/infra/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/investigate_app/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability_shared/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/slo/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/synthetics/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/uptime/tsconfig.type_check.json\r\n./x-pack/plugins/rule_registry/tsconfig.type_check.json\r\n./x-pack/plugins/stack_alerts/tsconfig.type_check.json\r\n./x-pack/plugins/transform/tsconfig.type_check.json\r\n./x-pack/plugins/triggers_actions_ui/tsconfig.type_check.json\r\n./x-pack/solutions/security/plugins/timelines/tsconfig.type_check.json\r\n./x-pack/test/alerting_api_integration/common/plugins/alerts/tsconfig.type_check.json\r\n./x-pack/test/security_solution_api_integration/tsconfig.type_check.json\r\n./x-pack/test/tsconfig.type_check.json\r\n./x-pack/test_serverless/tsconfig.type_check.json\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nsrc/platform/packages/shared/kbn-rule-data-utils/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-rule-data-utils/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-rule-data-utils/tsconfig.type_check.json:2\r\n```\r\n\r\n</details>\r\n\r\nCo-authored-by:
Marshall Main
<[email protected]>","sha":"e6a07e63829e116c8e809a3923b7b0fe239e1318","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:Detection
Engine","plugin
groups"],"number":202847,"url":"https://github.com/elastic/kibana/pull/202847","mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-detections-response` (#202847)\n\n##
Summary\r\n\r\nThis PR aims at relocating some of the Kibana modules
(plugins and\r\npackages) into a new folder structure, according to the
_Sustainable\r\nKibana Architecture_ initiative.\r\n\r\n>
[!IMPORTANT]\r\n> * We kindly ask you to:\r\n> * Manually fix the errors
in the error section below (if there are\r\nany).\r\n> * Search for the
`packages[\\/\\\\]` and `plugins[\\/\\\\]` patterns in the\r\nsource
code (Babel and Eslint config files), and update
them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
1 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/rule-data-utils`
|\r\n`src/platform/packages/shared/kbn-rule-data-utils`
|\r\n\r\n\r\n<details >\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./package.json\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/shared/kbn-rule-data-utils/jest.config.js\r\n./src/platform/plugins/shared/discover/tsconfig.type_check.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/examples/triggers_actions_ui_example/tsconfig.type_check.json\r\n./x-pack/packages/observability/alert_details/tsconfig.type_check.json\r\n./x-pack/packages/observability/alerting_test_data/tsconfig.type_check.json\r\n./x-pack/platform/plugins/private/monitoring/tsconfig.type_check.json\r\n./x-pack/plugins/alerting/tsconfig.type_check.json\r\n./x-pack/plugins/cases/tsconfig.type_check.json\r\n./x-pack/plugins/ml/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/apm/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/infra/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/investigate_app/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability_shared/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/slo/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/synthetics/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/uptime/tsconfig.type_check.json\r\n./x-pack/plugins/rule_registry/tsconfig.type_check.json\r\n./x-pack/plugins/stack_alerts/tsconfig.type_check.json\r\n./x-pack/plugins/transform/tsconfig.type_check.json\r\n./x-pack/plugins/triggers_actions_ui/tsconfig.type_check.json\r\n./x-pack/solutions/security/plugins/timelines/tsconfig.type_check.json\r\n./x-pack/test/alerting_api_integration/common/plugins/alerts/tsconfig.type_check.json\r\n./x-pack/test/security_solution_api_integration/tsconfig.type_check.json\r\n./x-pack/test/tsconfig.type_check.json\r\n./x-pack/test_serverless/tsconfig.type_check.json\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nsrc/platform/packages/shared/kbn-rule-data-utils/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-rule-data-utils/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-rule-data-utils/tsconfig.type_check.json:2\r\n```\r\n\r\n</details>\r\n\r\nCo-authored-by:
Marshall Main
<[email protected]>","sha":"e6a07e63829e116c8e809a3923b7b0fe239e1318"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202847","number":202847,"mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-detections-response` (#202847)\n\n##
Summary\r\n\r\nThis PR aims at relocating some of the Kibana modules
(plugins and\r\npackages) into a new folder structure, according to the
_Sustainable\r\nKibana Architecture_ initiative.\r\n\r\n>
[!IMPORTANT]\r\n> * We kindly ask you to:\r\n> * Manually fix the errors
in the error section below (if there are\r\nany).\r\n> * Search for the
`packages[\\/\\\\]` and `plugins[\\/\\\\]` patterns in the\r\nsource
code (Babel and Eslint config files), and update
them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
1 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/rule-data-utils`
|\r\n`src/platform/packages/shared/kbn-rule-data-utils`
|\r\n\r\n\r\n<details >\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./package.json\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/shared/kbn-rule-data-utils/jest.config.js\r\n./src/platform/plugins/shared/discover/tsconfig.type_check.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/examples/triggers_actions_ui_example/tsconfig.type_check.json\r\n./x-pack/packages/observability/alert_details/tsconfig.type_check.json\r\n./x-pack/packages/observability/alerting_test_data/tsconfig.type_check.json\r\n./x-pack/platform/plugins/private/monitoring/tsconfig.type_check.json\r\n./x-pack/plugins/alerting/tsconfig.type_check.json\r\n./x-pack/plugins/cases/tsconfig.type_check.json\r\n./x-pack/plugins/ml/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/apm/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/infra/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/investigate_app/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/observability_shared/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/slo/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/synthetics/tsconfig.type_check.json\r\n./x-pack/plugins/observability_solution/uptime/tsconfig.type_check.json\r\n./x-pack/plugins/rule_registry/tsconfig.type_check.json\r\n./x-pack/plugins/stack_alerts/tsconfig.type_check.json\r\n./x-pack/plugins/transform/tsconfig.type_check.json\r\n./x-pack/plugins/triggers_actions_ui/tsconfig.type_check.json\r\n./x-pack/solutions/security/plugins/timelines/tsconfig.type_check.json\r\n./x-pack/test/alerting_api_integration/common/plugins/alerts/tsconfig.type_check.json\r\n./x-pack/test/security_solution_api_integration/tsconfig.type_check.json\r\n./x-pack/test/tsconfig.type_check.json\r\n./x-pack/test_serverless/tsconfig.type_check.json\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nsrc/platform/packages/shared/kbn-rule-data-utils/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-rule-data-utils/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-rule-data-utils/tsconfig.type_check.json:2\r\n```\r\n\r\n</details>\r\n\r\nCo-authored-by:
Marshall Main
<[email protected]>","sha":"e6a07e63829e116c8e809a3923b7b0fe239e1318"}}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <[email protected]>
  • Loading branch information
marshallmain and gsoldevila authored Dec 18, 2024
1 parent 588b0c7 commit 42e71f4
Show file tree
Hide file tree
Showing 22 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
/^packages\/kbn-grouping/,
/^packages\/kbn-resizable-layout/,
/^packages\/kbn-rison/,
/^packages\/kbn-rule-data-utils/,
/^src\/platform\/packages\/shared\/kbn-rule-data-utils/,
/^packages\/kbn-safer-lodash-set/,
/^packages\/kbn-search-types/,
/^packages\/kbn-securitysolution-.*/,
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ packages/kbn-router-to-openapispec @elastic/kibana-core
packages/kbn-router-utils @elastic/obs-ux-logs-team
examples/routing_example @elastic/kibana-core
packages/kbn-rrule @elastic/response-ops
packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team
src/platform/packages/shared/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team
x-pack/plugins/rule_registry @elastic/response-ops @elastic/obs-ux-management-team
x-pack/platform/plugins/private/runtime_fields @elastic/kibana-management
packages/kbn-safer-lodash-set @elastic/kibana-security
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@
"@kbn/router-utils": "link:packages/kbn-router-utils",
"@kbn/routing-example-plugin": "link:examples/routing_example",
"@kbn/rrule": "link:packages/kbn-rrule",
"@kbn/rule-data-utils": "link:packages/kbn-rule-data-utils",
"@kbn/rule-data-utils": "link:src/platform/packages/shared/kbn-rule-data-utils",
"@kbn/rule-registry-plugin": "link:x-pack/plugins/rule_registry",
"@kbn/runtime-fields-plugin": "link:x-pack/platform/plugins/private/runtime_fields",
"@kbn/safer-lodash-set": "link:packages/kbn-safer-lodash-set",
Expand Down
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-rule-data-utils'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/platform/packages/shared/kbn-rule-data-utils'],
};
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 @@ -1510,8 +1510,8 @@
"@kbn/routing-example-plugin/*": ["examples/routing_example/*"],
"@kbn/rrule": ["packages/kbn-rrule"],
"@kbn/rrule/*": ["packages/kbn-rrule/*"],
"@kbn/rule-data-utils": ["packages/kbn-rule-data-utils"],
"@kbn/rule-data-utils/*": ["packages/kbn-rule-data-utils/*"],
"@kbn/rule-data-utils": ["src/platform/packages/shared/kbn-rule-data-utils"],
"@kbn/rule-data-utils/*": ["src/platform/packages/shared/kbn-rule-data-utils/*"],
"@kbn/rule-registry-plugin": ["x-pack/plugins/rule_registry"],
"@kbn/rule-registry-plugin/*": ["x-pack/plugins/rule_registry/*"],
"@kbn/runtime-fields-plugin": ["x-pack/platform/plugins/private/runtime_fields"],
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6827,7 +6827,7 @@
version "0.0.0"
uid ""

"@kbn/rule-data-utils@link:packages/kbn-rule-data-utils":
"@kbn/rule-data-utils@link:src/platform/packages/shared/kbn-rule-data-utils":
version "0.0.0"
uid ""

Expand Down

0 comments on commit 42e71f4

Please sign in to comment.