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-scalability` (#202849) (#204217)

# Backport

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

<!--- 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-13T10:24:39Z","message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-scalability` (#202849)\n\n## Summary\n\nThis PR aims
at relocating some of the Kibana modules (plugins and\npackages) into a
new folder structure, according to the _Sustainable\nKibana
Architecture_ initiative.\n\n> [!IMPORTANT]\n> * We kindly ask you
to:\n> * Manually fix the errors in the error section below (if there
are\nany).\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\nsource code (Babel and Eslint config
files), and update them\nappropriately.\n> * Manually
review\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\nany CI pipeline customizations continue to be correctly
applied after\nthe changed path names\n> * Review all of the updated
files, specially the `.ts` and `.js` files\nlisted in the sections
below, as some of them contain relative paths\nthat have been
updated.\n> * Think of potential impact of the move, including tooling
and\nconfiguration files that can be pointing to the relocated modules.
E.g.:\n> * customised eslint rules\n> * docs pointing to source
code\n\n> [!NOTE]\n> This PR has been auto-generated.\n> Do not attempt
to push any changes unless you know what you are doing.\n> Please
use\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\nSlack
channel for feedback.\n\n\n\n\n#### 1 plugin(s) are going to be
relocated:\n\n| Id | Target folder |\n| -- | ------------- |\n|
`@kbn/integration-assistant-plugin`
|\n`x-pack/platform/plugins/shared/integration_assistant`
|\n\n\n<details>\n<summary>Updated
references</summary>\n\n```\n./.eslintrc.js\n./docs/developer/plugin-list.asciidoc\n./package.json\n./packages/kbn-repo-packages/package-map.json\n./packages/kbn-ts-projects/config-paths.json\n./tsconfig.base.json\n./x-pack/.i18nrc.json\n./x-pack/platform/plugins/shared/integration_assistant/README.md\n./x-pack/platform/plugins/shared/integration_assistant/jest.config.js\n./x-pack/platform/plugins/shared/integration_assistant/server/config.ts\n./yarn.lock\n```\n</details>\n<details>\n<summary>Updated
relative
paths</summary>\n\n```\nx-pack/platform/plugins/shared/integration_assistant/jest.config.js:10\nx-pack/platform/plugins/shared/integration_assistant/scripts/draw_graphs.js:8\nx-pack/platform/plugins/shared/integration_assistant/tsconfig.json:13\nx-pack/platform/plugins/shared/integration_assistant/tsconfig.json:2\n```\n</details>\n<details>\n<summary>Script
errors</summary>\n\n```\n\n```\n</details>\n\n---------\n\nCo-authored-by:
Eric Beahan <[email protected]>\nCo-authored-by: kibanamachine
<[email protected]>","sha":"6bf5e68e06bf60df0075d6d60f57a836a1d49fc8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor","Team:Security-Scalability"],"number":202849,"url":"https://github.com/elastic/kibana/pull/202849","mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-scalability` (#202849)\n\n## Summary\n\nThis PR aims
at relocating some of the Kibana modules (plugins and\npackages) into a
new folder structure, according to the _Sustainable\nKibana
Architecture_ initiative.\n\n> [!IMPORTANT]\n> * We kindly ask you
to:\n> * Manually fix the errors in the error section below (if there
are\nany).\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\nsource code (Babel and Eslint config
files), and update them\nappropriately.\n> * Manually
review\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\nany CI pipeline customizations continue to be correctly
applied after\nthe changed path names\n> * Review all of the updated
files, specially the `.ts` and `.js` files\nlisted in the sections
below, as some of them contain relative paths\nthat have been
updated.\n> * Think of potential impact of the move, including tooling
and\nconfiguration files that can be pointing to the relocated modules.
E.g.:\n> * customised eslint rules\n> * docs pointing to source
code\n\n> [!NOTE]\n> This PR has been auto-generated.\n> Do not attempt
to push any changes unless you know what you are doing.\n> Please
use\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\nSlack
channel for feedback.\n\n\n\n\n#### 1 plugin(s) are going to be
relocated:\n\n| Id | Target folder |\n| -- | ------------- |\n|
`@kbn/integration-assistant-plugin`
|\n`x-pack/platform/plugins/shared/integration_assistant`
|\n\n\n<details>\n<summary>Updated
references</summary>\n\n```\n./.eslintrc.js\n./docs/developer/plugin-list.asciidoc\n./package.json\n./packages/kbn-repo-packages/package-map.json\n./packages/kbn-ts-projects/config-paths.json\n./tsconfig.base.json\n./x-pack/.i18nrc.json\n./x-pack/platform/plugins/shared/integration_assistant/README.md\n./x-pack/platform/plugins/shared/integration_assistant/jest.config.js\n./x-pack/platform/plugins/shared/integration_assistant/server/config.ts\n./yarn.lock\n```\n</details>\n<details>\n<summary>Updated
relative
paths</summary>\n\n```\nx-pack/platform/plugins/shared/integration_assistant/jest.config.js:10\nx-pack/platform/plugins/shared/integration_assistant/scripts/draw_graphs.js:8\nx-pack/platform/plugins/shared/integration_assistant/tsconfig.json:13\nx-pack/platform/plugins/shared/integration_assistant/tsconfig.json:2\n```\n</details>\n<details>\n<summary>Script
errors</summary>\n\n```\n\n```\n</details>\n\n---------\n\nCo-authored-by:
Eric Beahan <[email protected]>\nCo-authored-by: kibanamachine
<[email protected]>","sha":"6bf5e68e06bf60df0075d6d60f57a836a1d49fc8"}},"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/202849","number":202849,"mergeCommit":{"message":"Sustainable
Kibana Architecture: Move modules owned by
`@elastic/security-scalability` (#202849)\n\n## Summary\n\nThis PR aims
at relocating some of the Kibana modules (plugins and\npackages) into a
new folder structure, according to the _Sustainable\nKibana
Architecture_ initiative.\n\n> [!IMPORTANT]\n> * We kindly ask you
to:\n> * Manually fix the errors in the error section below (if there
are\nany).\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\nsource code (Babel and Eslint config
files), and update them\nappropriately.\n> * Manually
review\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\nany CI pipeline customizations continue to be correctly
applied after\nthe changed path names\n> * Review all of the updated
files, specially the `.ts` and `.js` files\nlisted in the sections
below, as some of them contain relative paths\nthat have been
updated.\n> * Think of potential impact of the move, including tooling
and\nconfiguration files that can be pointing to the relocated modules.
E.g.:\n> * customised eslint rules\n> * docs pointing to source
code\n\n> [!NOTE]\n> This PR has been auto-generated.\n> Do not attempt
to push any changes unless you know what you are doing.\n> Please
use\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\nSlack
channel for feedback.\n\n\n\n\n#### 1 plugin(s) are going to be
relocated:\n\n| Id | Target folder |\n| -- | ------------- |\n|
`@kbn/integration-assistant-plugin`
|\n`x-pack/platform/plugins/shared/integration_assistant`
|\n\n\n<details>\n<summary>Updated
references</summary>\n\n```\n./.eslintrc.js\n./docs/developer/plugin-list.asciidoc\n./package.json\n./packages/kbn-repo-packages/package-map.json\n./packages/kbn-ts-projects/config-paths.json\n./tsconfig.base.json\n./x-pack/.i18nrc.json\n./x-pack/platform/plugins/shared/integration_assistant/README.md\n./x-pack/platform/plugins/shared/integration_assistant/jest.config.js\n./x-pack/platform/plugins/shared/integration_assistant/server/config.ts\n./yarn.lock\n```\n</details>\n<details>\n<summary>Updated
relative
paths</summary>\n\n```\nx-pack/platform/plugins/shared/integration_assistant/jest.config.js:10\nx-pack/platform/plugins/shared/integration_assistant/scripts/draw_graphs.js:8\nx-pack/platform/plugins/shared/integration_assistant/tsconfig.json:13\nx-pack/platform/plugins/shared/integration_assistant/tsconfig.json:2\n```\n</details>\n<details>\n<summary>Script
errors</summary>\n\n```\n\n```\n</details>\n\n---------\n\nCo-authored-by:
Eric Beahan <[email protected]>\nCo-authored-by: kibanamachine
<[email protected]>","sha":"6bf5e68e06bf60df0075d6d60f57a836a1d49fc8"}}]}]
BACKPORT-->
  • Loading branch information
gsoldevila authored Dec 13, 2024
1 parent 8d8e985 commit 71e52f2
Show file tree
Hide file tree
Showing 413 changed files with 71 additions and 39 deletions.
12 changes: 6 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,8 @@ module.exports = {
{
// front end and common typescript and javascript files only
files: [
'x-pack/plugins/integration_assistant/public/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/integration_assistant/common/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/integration_assistant/public/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/integration_assistant/common/**/*.{js,mjs,ts,tsx}',
],
rules: {
'import/no-nodejs-modules': 'error',
Expand Down Expand Up @@ -1136,7 +1136,7 @@ module.exports = {
files: [
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{ts,tsx}',
'x-pack/plugins/elastic_assistant/**/*.{ts,tsx}',
'x-pack/plugins/integration_assistant/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/integration_assistant/**/*.{ts,tsx}',
'x-pack/packages/kbn-elastic-assistant/**/*.{ts,tsx}',
'x-pack/packages/kbn-elastic-assistant-common/**/*.{ts,tsx}',
'x-pack/packages/kbn-langchain/**/*.{ts,tsx}',
Expand All @@ -1151,7 +1151,7 @@ module.exports = {
excludedFiles: [
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/elastic_assistant/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/integration_assistant/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/platform/plugins/shared/integration_assistant/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/packages/kbn-elastic-assistant/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/packages/kbn-elastic-assistant-common/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/packages/kbn-langchain/**/*.{test,mock,test_helper}.{ts,tsx}',
Expand All @@ -1172,7 +1172,7 @@ module.exports = {
files: [
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{ts,tsx}',
'x-pack/plugins/elastic_assistant/**/*.{ts,tsx}',
'x-pack/plugins/integration_assistant/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/integration_assistant/**/*.{ts,tsx}',
'x-pack/packages/kbn-elastic-assistant/**/*.{ts,tsx}',
'x-pack/packages/kbn-elastic-assistant-common/**/*.{ts,tsx}',
'x-pack/packages/kbn-langchain/**/*.{ts,tsx}',
Expand Down Expand Up @@ -1206,7 +1206,7 @@ module.exports = {
files: [
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/elastic_assistant/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/integration_assistant/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/integration_assistant/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/kbn-elastic-assistant/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/kbn-elastic-assistant-common/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/kbn-langchain/**/*.{js,mjs,ts,tsx}',
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ x-pack/plugins/observability_solution/infra @elastic/obs-ux-logs-team @elastic/o
x-pack/plugins/ingest_pipelines @elastic/kibana-management
src/plugins/input_control_vis @elastic/kibana-presentation
src/plugins/inspector @elastic/kibana-presentation
x-pack/plugins/integration_assistant @elastic/security-scalability
x-pack/platform/plugins/shared/integration_assistant @elastic/security-scalability
src/plugins/interactive_setup @elastic/kibana-security
test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security
packages/kbn-interpreter @elastic/kibana-visualizations
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 @@ -657,7 +657,7 @@ the infrastructure monitoring use-case within Kibana.
|The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest pipelines.
|{kib-repo}blob/{branch}/x-pack/plugins/integration_assistant/README.md[integrationAssistant]
|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/integration_assistant/README.md[integrationAssistant]
|Team owner: Security Integrations Scalability
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@
"@kbn/ingest-pipelines-plugin": "link:x-pack/plugins/ingest_pipelines",
"@kbn/input-control-vis-plugin": "link:src/plugins/input_control_vis",
"@kbn/inspector-plugin": "link:src/plugins/inspector",
"@kbn/integration-assistant-plugin": "link:x-pack/plugins/integration_assistant",
"@kbn/integration-assistant-plugin": "link:x-pack/platform/plugins/shared/integration_assistant",
"@kbn/interactive-setup-plugin": "link:src/plugins/interactive_setup",
"@kbn/interactive-setup-test-endpoints-plugin": "link:test/interactive_setup_api_integration/plugins/test_endpoints",
"@kbn/interpreter": "link:packages/kbn-interpreter",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1074,8 +1074,8 @@
"@kbn/input-control-vis-plugin/*": ["src/plugins/input_control_vis/*"],
"@kbn/inspector-plugin": ["src/plugins/inspector"],
"@kbn/inspector-plugin/*": ["src/plugins/inspector/*"],
"@kbn/integration-assistant-plugin": ["x-pack/plugins/integration_assistant"],
"@kbn/integration-assistant-plugin/*": ["x-pack/plugins/integration_assistant/*"],
"@kbn/integration-assistant-plugin": ["x-pack/platform/plugins/shared/integration_assistant"],
"@kbn/integration-assistant-plugin/*": ["x-pack/platform/plugins/shared/integration_assistant/*"],
"@kbn/interactive-setup-plugin": ["src/plugins/interactive_setup"],
"@kbn/interactive-setup-plugin/*": ["src/plugins/interactive_setup/*"],
"@kbn/interactive-setup-test-endpoints-plugin": ["test/interactive_setup_api_integration/plugins/test_endpoints"],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"xpack.logsShared": "plugins/observability_solution/logs_shared",
"xpack.fleet": "plugins/fleet",
"xpack.ingestPipelines": "plugins/ingest_pipelines",
"xpack.integrationAssistant": "plugins/integration_assistant",
"xpack.integrationAssistant": "platform/plugins/shared/integration_assistant",
"xpack.inference": "platform/plugins/shared/inference",
"xpack.inventory": "plugins/observability_solution/inventory",
"xpack.investigate": "plugins/observability_solution/investigate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@ All mocks/fixtures are placed in the top `./__jest__` directory of the plugin. I
Tests can be run with:

```bash
node scripts/jest x-pack/plugins/integration_assistant/ --coverage
node scripts/jest x-pack/platform/plugins/shared/integration_assistant/ --coverage
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* 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/platform/plugins/shared/integration_assistant'],
coverageDirectory:
'<rootDir>/target/kibana-coverage/jest/x-pack/platform/plugins/shared/integration_assistant',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/x-pack/platform/plugins/shared/integration_assistant/{common,server,public}/**/*.{ts,tsx}',
'!<rootDir>/x-pack/platform/plugins/shared/integration_assistant/{__jest__}/**/*',
'!<rootDir>/x-pack/platform/plugins/shared/integration_assistant/**/*.test.{ts,tsx}',
'!<rootDir>/x-pack/platform/plugins/shared/integration_assistant/**/*.config.ts',
],
setupFiles: ['jest-canvas-mock'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
* 2.0.
*/

require('../../../../src/setup_node_env');
require('../../../../../../src/setup_node_env');
require('./draw_graphs_script').drawGraphs();
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const configSchema = schema.object({
* For internal use. A list of string values (comma delimited) that will enable experimental
* type of functionality that is not yet released. Valid values for this settings need to
* be defined in:
* `x-pack/plugins/integration_assistant/common/experimental_features.ts`
* `x-pack/platform/plugins/shared/integration_assistant/common/experimental_features.ts`
* under the `allowedExperimentalValues` object
*
* @example
Expand Down
Loading

0 comments on commit 71e52f2

Please sign in to comment.