Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sustainable Kibana Architecture: Move modules owned by @elastic/obs-entities #202713

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,6 @@ x-pack/packages/kbn-cloud-security-posture/public @elastic/kibana-cloud-security
x-pack/packages/kbn-data-forge @elastic/obs-ux-management-team
x-pack/packages/kbn-elastic-assistant @elastic/security-generative-ai
x-pack/packages/kbn-elastic-assistant-common @elastic/security-generative-ai
x-pack/packages/kbn-entities-schema @elastic/obs-entities
x-pack/packages/kbn-infra-forge @elastic/obs-ux-management-team
x-pack/packages/kbn-langchain @elastic/security-generative-ai
x-pack/packages/kbn-random-sampling @elastic/kibana-visualizations
Expand Down Expand Up @@ -864,6 +863,8 @@ x-pack/packages/security/plugin_types_server @elastic/kibana-security
x-pack/packages/security/role_management_model @elastic/kibana-security
x-pack/packages/security/ui_components @elastic/kibana-security
x-pack/performance @elastic/appex-qa
x-pack/platform/packages/shared/kbn-entities-schema @elastic/obs-entities
x-pack/platform/plugins/shared/entity_manager @elastic/obs-entities
x-pack/plugins/actions @elastic/response-ops
x-pack/plugins/ai_infra/llm_tasks @elastic/appex-ai-infra
x-pack/plugins/ai_infra/product_doc_base @elastic/appex-ai-infra
Expand Down Expand Up @@ -894,7 +895,6 @@ x-pack/plugins/elastic_assistant @elastic/security-generative-ai
x-pack/plugins/embeddable_enhanced @elastic/kibana-presentation
x-pack/plugins/encrypted_saved_objects @elastic/kibana-security
x-pack/plugins/enterprise_search @elastic/search-kibana
x-pack/plugins/entity_manager @elastic/obs-entities
x-pack/plugins/event_log @elastic/response-ops
x-pack/plugins/features @elastic/kibana-core
x-pack/plugins/fields_metadata @elastic/obs-ux-logs-team
Expand Down Expand Up @@ -926,8 +926,6 @@ x-pack/plugins/observability_solution/apm @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/apm_data_access @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/apm/ftr_e2e @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/dataset_quality @elastic/obs-ux-logs-team
x-pack/plugins/observability_solution/entities_data_access @elastic/obs-entities
x-pack/plugins/observability_solution/entity_manager_app @elastic/obs-entities
x-pack/plugins/observability_solution/exploratory_view @elastic/obs-ux-management-team
x-pack/plugins/observability_solution/infra @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/inventory @elastic/obs-ux-infra_services-team
Expand Down Expand Up @@ -994,6 +992,8 @@ x-pack/plugins/translations @elastic/kibana-localization
x-pack/plugins/triggers_actions_ui @elastic/response-ops
x-pack/plugins/upgrade_assistant @elastic/kibana-management
x-pack/plugins/watcher @elastic/kibana-management
x-pack/solutions/observability/plugins/observability_solution/entities_data_access @elastic/obs-entities
x-pack/solutions/observability/plugins/observability_solution/entity_manager_app @elastic/obs-entities
x-pack/test
x-pack/test_serverless
x-pack/test/alerting_api_integration/common/plugins/aad @elastic/response-ops
Expand Down
6 changes: 3 additions & 3 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -575,15 +575,15 @@ security and spaces filtering.
|This plugin provides Kibana user interfaces for managing the Enterprise Search solution and its products, App Search and Workplace Search.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_solution/entities_data_access/README.md[entitiesDataAccess]
|{kib-repo}blob/{branch}/x-pack/solutions/observability/plugins/observability_solution/entities_data_access/README.md[entitiesDataAccess]
|Exposes services to access entities data.
|{kib-repo}blob/{branch}/x-pack/plugins/entity_manager/README.md[entityManager]
|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/entity_manager/README.md[entityManager]
|This plugin provides access to observed entity data, such as information about hosts, pods, containers, services, and more.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_solution/entity_manager_app/README.md[entityManagerApp]
|{kib-repo}blob/{branch}/x-pack/solutions/observability/plugins/observability_solution/entity_manager_app/README.md[entityManagerApp]
|This plugin provides a user interface to interact with the Entity Manager.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,11 @@
"@kbn/embedded-lens-example-plugin": "link:x-pack/examples/embedded_lens_example",
"@kbn/encrypted-saved-objects-plugin": "link:x-pack/plugins/encrypted_saved_objects",
"@kbn/enterprise-search-plugin": "link:x-pack/plugins/enterprise_search",
"@kbn/entities-data-access-plugin": "link:x-pack/plugins/observability_solution/entities_data_access",
"@kbn/entities-schema": "link:x-pack/packages/kbn-entities-schema",
"@kbn/entities-data-access-plugin": "link:x-pack/solutions/observability/plugins/observability_solution/entities_data_access",
"@kbn/entities-schema": "link:x-pack/platform/packages/shared/kbn-entities-schema",
"@kbn/entity-manager-fixture-plugin": "link:x-pack/test/api_integration/apis/entity_manager/fixture_plugin",
"@kbn/entityManager-app-plugin": "link:x-pack/plugins/observability_solution/entity_manager_app",
"@kbn/entityManager-plugin": "link:x-pack/plugins/entity_manager",
"@kbn/entityManager-app-plugin": "link:x-pack/solutions/observability/plugins/observability_solution/entity_manager_app",
"@kbn/entityManager-plugin": "link:x-pack/platform/plugins/shared/entity_manager",
"@kbn/error-boundary-example-plugin": "link:examples/error_boundary",
"@kbn/es-errors": "link:packages/kbn-es-errors",
"@kbn/es-query": "link:packages/kbn-es-query",
Expand Down
16 changes: 8 additions & 8 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -822,16 +822,16 @@
"@kbn/encrypted-saved-objects-plugin/*": ["x-pack/plugins/encrypted_saved_objects/*"],
"@kbn/enterprise-search-plugin": ["x-pack/plugins/enterprise_search"],
"@kbn/enterprise-search-plugin/*": ["x-pack/plugins/enterprise_search/*"],
"@kbn/entities-data-access-plugin": ["x-pack/plugins/observability_solution/entities_data_access"],
"@kbn/entities-data-access-plugin/*": ["x-pack/plugins/observability_solution/entities_data_access/*"],
"@kbn/entities-schema": ["x-pack/packages/kbn-entities-schema"],
"@kbn/entities-schema/*": ["x-pack/packages/kbn-entities-schema/*"],
"@kbn/entities-data-access-plugin": ["x-pack/solutions/observability/plugins/observability_solution/entities_data_access"],
"@kbn/entities-data-access-plugin/*": ["x-pack/solutions/observability/plugins/observability_solution/entities_data_access/*"],
"@kbn/entities-schema": ["x-pack/platform/packages/shared/kbn-entities-schema"],
"@kbn/entities-schema/*": ["x-pack/platform/packages/shared/kbn-entities-schema/*"],
"@kbn/entity-manager-fixture-plugin": ["x-pack/test/api_integration/apis/entity_manager/fixture_plugin"],
"@kbn/entity-manager-fixture-plugin/*": ["x-pack/test/api_integration/apis/entity_manager/fixture_plugin/*"],
"@kbn/entityManager-app-plugin": ["x-pack/plugins/observability_solution/entity_manager_app"],
"@kbn/entityManager-app-plugin/*": ["x-pack/plugins/observability_solution/entity_manager_app/*"],
"@kbn/entityManager-plugin": ["x-pack/plugins/entity_manager"],
"@kbn/entityManager-plugin/*": ["x-pack/plugins/entity_manager/*"],
"@kbn/entityManager-app-plugin": ["x-pack/solutions/observability/plugins/observability_solution/entity_manager_app"],
"@kbn/entityManager-app-plugin/*": ["x-pack/solutions/observability/plugins/observability_solution/entity_manager_app/*"],
"@kbn/entityManager-plugin": ["x-pack/platform/plugins/shared/entity_manager"],
"@kbn/entityManager-plugin/*": ["x-pack/platform/plugins/shared/entity_manager/*"],
"@kbn/error-boundary-example-plugin": ["examples/error_boundary"],
"@kbn/error-boundary-example-plugin/*": ["examples/error_boundary/*"],
"@kbn/es": ["packages/kbn-es"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/x-pack/packages/kbn-entities-schema'],
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/platform/packages/shared/kbn-entities-schema'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

require('../../../../src/setup_node_env');
require('../../../../../../src/setup_node_env');

const { generateOAS } = require('./generate_oas');
const { writeFileSync } = require('fs');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

require('../../../../src/setup_node_env');
require('../../../../../../src/setup_node_env');

const swaggerJsdoc = require('swagger-jsdoc');
const { zodToJsonSchema } = require('zod-to-json-schema');
Expand Down Expand Up @@ -62,6 +62,6 @@ export const generateOAS = (options) =>
},
},
},
apis: ['../../plugins/observability_solution/entity_manager/server/routes/**/*.ts'],
apis: ['../../../../plugins/observability_solution/entity_manager/server/routes/**/*.ts'],
...options,
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

require('../../../../src/setup_node_env');
require('../../../../../../src/setup_node_env');

const { generateOAS } = require('./generate_oas');
const express = require('express');
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Entity definitions are a core concept of the entity model. They define the way t
> [!NOTE]
> Entity definitions are based on transform and as such a subset of the configuration is tightly coupled to transform settings. While we provide defaults for these settings, one can still update properties such as `frequency`, `sync.time.delay` and `sync.time.field` (see [transform documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html)).

When creating a definition (see [entity definition schema](https://github.com/elastic/kibana/blob/main/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts#L21)), entity manager will create a transforms to collect entities based on the configured [identityFields](https://github.com/elastic/kibana/blob/main/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts#L29).
When creating a definition (see [entity definition schema](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-entities-schema/src/schema/entity_definition.ts#L21)), entity manager will create a transforms to collect entities based on the configured [identityFields](https://github.com/elastic/kibana/blob/main/x-pack/platform/packages/shared/kbn-entities-schema/src/schema/entity_definition.ts#L29).
The transform creates one document per entity, reading documents from the configured source indices and grouping them by the identity fields. Each entity document gets overwritten each time the transform runs.

The transforms outputs the data to a unique index (`.entities.v1.latest.<definition-id>`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/x-pack/plugins/entity_manager'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/entity_manager',
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/platform/plugins/shared/entity_manager'],
coverageDirectory:
'<rootDir>/target/kibana-coverage/jest/x-pack/platform/plugins/shared/entity_manager',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/x-pack/plugins/entity_manager/{common,public,server}/**/*.{js,ts,tsx}',
'<rootDir>/x-pack/platform/plugins/shared/entity_manager/{common,public,server}/**/*.{js,ts,tsx}',
],
};
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "../../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types"
},
"include": [
"../../../typings/**/*",
"../../../../../typings/**/*",
"common/**/*",
"server/**/*",
"public/**/*",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const path = require('path');

module.exports = {
preset: '@kbn/test',
rootDir: path.resolve(__dirname, '../../../..'),
roots: ['<rootDir>/x-pack/plugins/observability_solution/entities_data_access'],
rootDir: path.resolve(__dirname, '../../../../../..'),
roots: [
'<rootDir>/x-pack/solutions/observability/plugins/observability_solution/entities_data_access',
],
};
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"
},
Expand Down
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.
*/

const path = require('path');

module.exports = {
preset: '@kbn/test',
rootDir: path.resolve(__dirname, '../../../../../..'),
roots: [
'<rootDir>/x-pack/solutions/observability/plugins/observability_solution/entity_manager_app',
],
coverageDirectory:
'<rootDir>/target/kibana-coverage/jest/x-pack/solutions/observability/plugins/observability_solution/entity_manager_app',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/x-pack/solutions/observability/plugins/observability_solution/entity_manager_app/{common,public,server}/**/*.{js,ts,tsx}',
],
};
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types"
},
"include": [
"../../../../typings/**/*",
"../../../../../../typings/**/*",
"common/**/*",
"public/**/*",
"types/**/*"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5460,23 +5460,23 @@
version "0.0.0"
uid ""

"@kbn/entities-data-access-plugin@link:x-pack/plugins/observability_solution/entities_data_access":
"@kbn/entities-data-access-plugin@link:x-pack/solutions/observability/plugins/observability_solution/entities_data_access":
version "0.0.0"
uid ""

"@kbn/entities-schema@link:x-pack/packages/kbn-entities-schema":
"@kbn/entities-schema@link:x-pack/platform/packages/shared/kbn-entities-schema":
version "0.0.0"
uid ""

"@kbn/entity-manager-fixture-plugin@link:x-pack/test/api_integration/apis/entity_manager/fixture_plugin":
version "0.0.0"
uid ""

"@kbn/entityManager-app-plugin@link:x-pack/plugins/observability_solution/entity_manager_app":
"@kbn/entityManager-app-plugin@link:x-pack/solutions/observability/plugins/observability_solution/entity_manager_app":
version "0.0.0"
uid ""

"@kbn/entityManager-plugin@link:x-pack/plugins/entity_manager":
"@kbn/entityManager-plugin@link:x-pack/platform/plugins/shared/entity_manager":
version "0.0.0"
uid ""

Expand Down