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-threat-hunting` (elastic#203046)

## 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.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 2 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/data-stream-adapter` |
`x-pack/solutions/security/packages/kbn-data-stream-adapter` |
| `@kbn/index-adapter` |
`x-pack/solutions/security/packages/kbn-index-adapter` |

---------

Co-authored-by: PhilippeOberti <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
3 people authored Dec 13, 2024
1 parent 0294838 commit a9f076c
Show file tree
Hide file tree
Showing 41 changed files with 114 additions and 166 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ module.exports = {
'x-pack/plugins/security_solution_serverless/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/plugins/timelines/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/cases/**/*.{js,mjs,ts,tsx}',
'packages/kbn-data-stream-adapter/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/packages/data-stream-adapter/**/*.{js,mjs,ts,tsx}',
'packages/kbn-cell-actions/**/*.{js,mjs,ts,tsx}',
],
plugins: ['eslint-plugin-node', 'react'],
Expand Down Expand Up @@ -1316,7 +1316,7 @@ module.exports = {
'x-pack/plugins/security_solution_serverless/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/cases/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/kbn-data-stream-adapter/**/*.{js,mjs,ts,tsx}',
'x-pack/x-pack/solutions/security/packages/data-stream-adapter/**/*.{js,mjs,ts,tsx}',
'packages/kbn-cell-actions/**/*.{js,mjs,ts,tsx}',
],
rules: {
Expand Down
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ packages/kbn-custom-icons @elastic/obs-ux-logs-team
packages/kbn-custom-integrations @elastic/obs-ux-logs-team
packages/kbn-cypress-config @elastic/kibana-operations
packages/kbn-data-service @elastic/kibana-visualizations @elastic/kibana-data-discovery
packages/kbn-data-stream-adapter @elastic/security-threat-hunting
packages/kbn-data-view-utils @elastic/kibana-data-discovery
packages/kbn-datemath @elastic/kibana-data-discovery
packages/kbn-dependency-ownership @elastic/kibana-security
Expand Down Expand Up @@ -376,7 +375,6 @@ packages/kbn-i18n @elastic/kibana-core
packages/kbn-i18n-react @elastic/kibana-core
packages/kbn-import-locator @elastic/kibana-operations
packages/kbn-import-resolver @elastic/kibana-operations
packages/kbn-index-adapter @elastic/security-threat-hunting
packages/kbn-interpreter @elastic/kibana-visualizations
packages/kbn-io-ts-utils @elastic/obs-knowledge-team
packages/kbn-ipynb @elastic/search-kibana
Expand Down Expand Up @@ -991,10 +989,12 @@ x-pack/solutions/observability/plugins/synthetics/e2e @elastic/obs-ux-management
x-pack/solutions/observability/plugins/uptime @elastic/obs-ux-management-team
x-pack/solutions/observability/plugins/ux @elastic/obs-ux-management-team
x-pack/solutions/security/packages/data_table @elastic/security-threat-hunting-investigations
x-pack/solutions/security/packages/data-stream-adapter @elastic/security-threat-hunting
x-pack/solutions/security/packages/distribution_bar @elastic/kibana-cloud-security-posture
x-pack/solutions/security/packages/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/expandable-flyout @elastic/security-threat-hunting-investigations
x-pack/solutions/security/packages/features @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/index-adapter @elastic/security-threat-hunting
x-pack/solutions/security/packages/navigation @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/side_nav @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/storybook/config @elastic/security-threat-hunting-explore
Expand Down Expand Up @@ -3352,9 +3352,9 @@ x-pack/solutions/security/packages/ecs_data_quality_dashboard @elastic/security-
x-pack/solutions/security/packages/features @elastic/security-threat-hunting-explore
x-pack/solutions/security/packages/kbn-cloud-security-posture/graph @elastic/kibana-cloud-security-posture
x-pack/solutions/security/packages/kbn-cloud-security-posture/public @elastic/kibana-cloud-security-posture
x-pack/solutions/security/packages/kbn-data-stream-adapter @elastic/security-threat-hunting
x-pack/solutions/security/packages/data-stream-adapter @elastic/security-threat-hunting
x-pack/solutions/security/packages/expandable-flyout @elastic/security-threat-hunting-investigations
x-pack/solutions/security/packages/kbn-index-adapter @elastic/security-threat-hunting
x-pack/solutions/security/packages/index-adapter @elastic/security-threat-hunting
x-pack/solutions/security/packages/kbn-securitysolution-autocomplete @elastic/security-detection-engine
x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common @elastic/security-detection-engine
x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components @elastic/security-detection-engine
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
"@kbn/data-quality-plugin": "link:x-pack/plugins/data_quality",
"@kbn/data-search-plugin": "link:test/plugin_functional/plugins/data_search",
"@kbn/data-service": "link:packages/kbn-data-service",
"@kbn/data-stream-adapter": "link:packages/kbn-data-stream-adapter",
"@kbn/data-stream-adapter": "link:x-pack/solutions/security/packages/data-stream-adapter",
"@kbn/data-usage-plugin": "link:x-pack/platform/plugins/private/data_usage",
"@kbn/data-view-editor-plugin": "link:src/plugins/data_view_editor",
"@kbn/data-view-field-editor-example-plugin": "link:examples/data_view_field_editor_example",
Expand Down Expand Up @@ -571,7 +571,7 @@
"@kbn/i18n-react": "link:packages/kbn-i18n-react",
"@kbn/iframe-embedded-plugin": "link:x-pack/test/functional_embedded/plugins/iframe_embedded",
"@kbn/image-embeddable-plugin": "link:src/plugins/image_embeddable",
"@kbn/index-adapter": "link:packages/kbn-index-adapter",
"@kbn/index-adapter": "link:x-pack/solutions/security/packages/index-adapter",
"@kbn/index-lifecycle-management-common-shared": "link:x-pack/packages/index-lifecycle-management/index_lifecycle_management_common_shared",
"@kbn/index-lifecycle-management-plugin": "link:x-pack/plugins/index_lifecycle_management",
"@kbn/index-management-plugin": "link:x-pack/plugins/index_management",
Expand Down
14 changes: 0 additions & 14 deletions packages/kbn-data-stream-adapter/jest.config.js

This file was deleted.

14 changes: 0 additions & 14 deletions packages/kbn-index-adapter/jest.config.js

This file was deleted.

8 changes: 4 additions & 4 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@
"@kbn/data-search-plugin/*": ["test/plugin_functional/plugins/data_search/*"],
"@kbn/data-service": ["packages/kbn-data-service"],
"@kbn/data-service/*": ["packages/kbn-data-service/*"],
"@kbn/data-stream-adapter": ["packages/kbn-data-stream-adapter"],
"@kbn/data-stream-adapter/*": ["packages/kbn-data-stream-adapter/*"],
"@kbn/data-stream-adapter": ["x-pack/solutions/security/packages/data-stream-adapter"],
"@kbn/data-stream-adapter/*": ["x-pack/solutions/security/packages/data-stream-adapter/*"],
"@kbn/data-usage-plugin": ["x-pack/platform/plugins/private/data_usage"],
"@kbn/data-usage-plugin/*": ["x-pack/platform/plugins/private/data_usage/*"],
"@kbn/data-view-editor-plugin": ["src/plugins/data_view_editor"],
Expand Down Expand Up @@ -1048,8 +1048,8 @@
"@kbn/import-locator/*": ["packages/kbn-import-locator/*"],
"@kbn/import-resolver": ["packages/kbn-import-resolver"],
"@kbn/import-resolver/*": ["packages/kbn-import-resolver/*"],
"@kbn/index-adapter": ["packages/kbn-index-adapter"],
"@kbn/index-adapter/*": ["packages/kbn-index-adapter/*"],
"@kbn/index-adapter": ["x-pack/solutions/security/packages/index-adapter"],
"@kbn/index-adapter/*": ["x-pack/solutions/security/packages/index-adapter/*"],
"@kbn/index-lifecycle-management-common-shared": ["x-pack/packages/index-lifecycle-management/index_lifecycle_management_common_shared"],
"@kbn/index-lifecycle-management-common-shared/*": ["x-pack/packages/index-lifecycle-management/index_lifecycle_management_common_shared/*"],
"@kbn/index-lifecycle-management-plugin": ["x-pack/plugins/index_lifecycle_management"],
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

export { DataStreamAdapter } from './src/data_stream_adapter';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* 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/solutions/security/packages/data-stream-adapter'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "@kbn/data-stream-adapter",
"version": "1.0.0",
"description": "Utility library for Elasticsearch Data Stream management",
"license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0",
"license": "Elastic License 2.0",
"private": true
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import type { IndicesDataStream } from '@elastic/elasticsearch/lib/api/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import type { IndicesDataStream } from '@elastic/elasticsearch/lib/api/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import { IndexAdapter, SetIndexTemplateParams, type InstallParams } from '@kbn/index-adapter';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import {
Expand Down
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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

export { IndexAdapter } from './src/index_adapter';
Expand Down
12 changes: 12 additions & 0 deletions x-pack/solutions/security/packages/index-adapter/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* 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/solutions/security/packages/index-adapter'],
};
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "@kbn/index-adapter",
"version": "1.0.0",
"description": "Utility library for Elasticsearch index management",
"license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0",
"license": "Elastic License 2.0",
"private": true
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import type {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import type { IndexName } from '@elastic/elasticsearch/lib/api/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import type {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
* 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.
*/

import { EcsFlat } from '@elastic/ecs';
Expand Down
Loading

0 comments on commit a9f076c

Please sign in to comment.