Skip to content

Commit

Permalink
Sustainable Kibana Architecture: Move modules owned by `@elastic/secu…
Browse files Browse the repository at this point in the history
…rity-scalability` (elastic#202849)

## 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.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * 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, as some of them contain relative paths
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

> [!NOTE]
> This PR has been auto-generated.
> Do not attempt to push any changes unless you know what you are doing.
> Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

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

| Id | Target folder |
| -- | ------------- |
| `@kbn/integration-assistant-plugin` |
`x-pack/platform/plugins/shared/integration_assistant` |

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

```
./.eslintrc.js
./docs/developer/plugin-list.asciidoc
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./tsconfig.base.json
./x-pack/.i18nrc.json
./x-pack/platform/plugins/shared/integration_assistant/README.md
./x-pack/platform/plugins/shared/integration_assistant/jest.config.js
./x-pack/platform/plugins/shared/integration_assistant/server/config.ts
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>

```
x-pack/platform/plugins/shared/integration_assistant/jest.config.js:10
x-pack/platform/plugins/shared/integration_assistant/scripts/draw_graphs.js:8
x-pack/platform/plugins/shared/integration_assistant/tsconfig.json:13
x-pack/platform/plugins/shared/integration_assistant/tsconfig.json:2
```
</details>
<details>
<summary>Script errors</summary>

```

```
</details>

---------

Co-authored-by: Eric Beahan <eric.beahan@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 6bf5e68)

# Conflicts:
#	.github/CODEOWNERS
#	x-pack/platform/plugins/shared/integration_assistant/server/templates/readme.njk
  • Loading branch information
gsoldevila committed Dec 13, 2024
1 parent 513a9c6 commit 7bacf31
Show file tree
Hide file tree
Showing 413 changed files with 40 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
Validating CODEOWNERS rules …
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 7bacf31

Please sign in to comment.