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

[8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/security-generative-ai (#202848) #204468

Merged
merged 10 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ const getPipeline = (filename: string, removeSteps = true) => {
/^x-pack\/plugins\/triggers_actions_ui\/server\/connector_types\/openai/,
/^x-pack\/plugins\/triggers_actions_ui\/server\/connector_types\/bedrock/,
/^x-pack\/plugins\/usage_collection\/public/,
/^x-pack\/plugins\/elastic_assistant/,
/^x-pack\/solutions\/security\/plugins\/elastic_assistant/,
/^x-pack\/packages\/security-solution/,
/^x-pack\/packages\/kbn-elastic-assistant/,
/^x-pack\/packages\/kbn-elastic-assistant-common/,
/^x-pack\/platform\/packages\/shared\/kbn-elastic-assistant/,
/^x-pack\/platform\/packages\/shared\/kbn-elastic-assistant-common/,
/^x-pack\/test\/functional\/es_archives\/security_solution/,
/^x-pack\/test\/security_solution_cypress/,
])) ||
Expand Down Expand Up @@ -321,13 +321,13 @@ const getPipeline = (filename: string, removeSteps = true) => {
/^src\/plugins\/ui_actions/,
/^src\/plugins\/unified_histogram/,
/^src\/plugins\/unified_search/,
/^x-pack\/packages\/kbn-elastic-assistant/,
/^x-pack\/packages\/kbn-elastic-assistant-common/,
/^x-pack\/platform\/packages\/shared\/kbn-elastic-assistant/,
/^x-pack\/platform\/packages\/shared\/kbn-elastic-assistant-common/,
/^x-pack\/packages\/security-solution/,
/^x-pack\/plugins\/alerting/,
/^x-pack\/plugins\/cases/,
/^x-pack\/plugins\/data_views\/common/,
/^x-pack\/plugins\/elastic_assistant/,
/^x-pack\/solutions\/security\/plugins\/elastic_assistant/,
/^x-pack\/plugins\/lists/,
/^x-pack\/plugins\/rule_registry\/common/,
/^x-pack\/plugins\/security_solution/,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ source .buildkite/scripts/common/util.sh

echo --- Elastic Assistant OpenAPI Code Generation

(cd x-pack/packages/kbn-elastic-assistant-common && yarn openapi:generate)
(cd x-pack/platform/packages/shared/kbn-elastic-assistant-common && yarn openapi:generate)
check_for_changed_files "yarn openapi:generate" true
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ echo -e "\n[Security Solution OpenAPI Bundling] Endpoint Management API\n"
(cd x-pack/plugins/security_solution && yarn openapi:bundle:endpoint-management)

echo -e "\n[Security Solution OpenAPI Bundling] Elastic Assistant API\n"
(cd x-pack/packages/kbn-elastic-assistant-common && yarn openapi:bundle)
(cd x-pack/platform/packages/shared/kbn-elastic-assistant-common && yarn openapi:bundle)

echo -e "\n[Security Solution OpenAPI Bundling] Osquery API\n"
(cd x-pack/platform/plugins/shared/osquery && yarn openapi:bundle)
Expand Down
38 changes: 19 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1099,9 +1099,9 @@ module.exports = {
// front end and common typescript and javascript files only
files: [
'x-pack/plugins/ecs_data_quality_dashboard/common/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/elastic_assistant/common/**/*.{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/solutions/security/plugins/elastic_assistant/common/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/shared/kbn-elastic-assistant/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/shared/kbn-elastic-assistant-common/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/packages/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/security_solution/public/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/security_solution_ess/public/**/*.{js,mjs,ts,tsx}',
Expand Down Expand Up @@ -1135,11 +1135,11 @@ module.exports = {
// This should be a very small set as most linter rules are useful for tests as well.
files: [
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{ts,tsx}',
'x-pack/plugins/elastic_assistant/**/*.{ts,tsx}',
'x-pack/solutions/security/plugins/elastic_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}',
'x-pack/platform/packages/shared/kbn-elastic-assistant/**/*.{ts,tsx}',
'x-pack/platform/packages/shared/kbn-elastic-assistant-common/**/*.{ts,tsx}',
'x-pack/platform/packages/shared/kbn-langchain/**/*.{ts,tsx}',
'x-pack/solutions/security/packages/**/*.{ts,tsx}',
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
'x-pack/plugins/security_solution_ess/**/*.{ts,tsx}',
Expand All @@ -1150,11 +1150,11 @@ 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/solutions/security/plugins/elastic_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}',
'x-pack/platform/packages/shared/kbn-elastic-assistant/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/platform/packages/shared/kbn-elastic-assistant-common/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/platform/packages/shared/kbn-langchain/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/solutions/security/packages/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/security_solution/**/*.{test,mock,test_helper}.{ts,tsx}',
'x-pack/plugins/security_solution_ess/**/*.{test,mock,test_helper}.{ts,tsx}',
Expand All @@ -1171,11 +1171,11 @@ module.exports = {
// typescript only for front and back end
files: [
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{ts,tsx}',
'x-pack/plugins/elastic_assistant/**/*.{ts,tsx}',
'x-pack/solutions/security/plugins/elastic_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}',
'x-pack/platform/packages/shared/kbn-elastic-assistant/**/*.{ts,tsx}',
'x-pack/platform/packages/shared/kbn-elastic-assistant-common/**/*.{ts,tsx}',
'x-pack/platform/packages/shared/kbn-langchain/**/*.{ts,tsx}',
'x-pack/solutions/security/packages/**/*.{ts,tsx}',
'x-pack/plugins/security_solution/**/*.{ts,tsx}',
'x-pack/plugins/security_solution_ess/**/*.{ts,tsx}',
Expand Down Expand Up @@ -1205,11 +1205,11 @@ module.exports = {
// typescript and javascript for front and back end
files: [
'x-pack/plugins/ecs_data_quality_dashboard/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/elastic_assistant/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/plugins/elastic_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}',
'x-pack/platform/packages/shared/kbn-elastic-assistant/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/shared/kbn-elastic-assistant-common/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/shared/kbn-langchain/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/packages/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/security_solution_ess/**/*.{js,mjs,ts,tsx}',
Expand Down
14 changes: 10 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ packages/kbn-ebt-tools @elastic/kibana-core
x-pack/solutions/security/packages/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore
x-pack/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore
packages/kbn-elastic-agent-utils @elastic/obs-ux-logs-team
x-pack/packages/kbn-elastic-assistant @elastic/security-generative-ai
x-pack/packages/kbn-elastic-assistant-common @elastic/security-generative-ai
x-pack/plugins/elastic_assistant @elastic/security-generative-ai
x-pack/platform/packages/shared/kbn-elastic-assistant @elastic/security-generative-ai
x-pack/platform/packages/shared/kbn-elastic-assistant-common @elastic/security-generative-ai
x-pack/solutions/security/plugins/elastic_assistant @elastic/security-generative-ai
test/plugin_functional/plugins/elasticsearch_client_plugin @elastic/kibana-core
x-pack/test/plugin_api_integration/plugins/elasticsearch_client @elastic/kibana-core
x-pack/plugins/embeddable_enhanced @elastic/kibana-presentation
Expand Down Expand Up @@ -567,7 +567,7 @@ src/plugins/kibana_react @elastic/appex-sharedux
src/plugins/kibana_usage_collection @elastic/kibana-core
src/plugins/kibana_utils @elastic/appex-sharedux
x-pack/plugins/kubernetes_security @elastic/kibana-cloud-security-posture
x-pack/packages/kbn-langchain @elastic/security-generative-ai
x-pack/platform/packages/shared/kbn-langchain @elastic/security-generative-ai
src/platform/packages/private/kbn-language-documentation @elastic/kibana-esql
x-pack/examples/lens_config_builder_example @elastic/kibana-visualizations
packages/kbn-lens-embeddable-utils @elastic/obs-ux-infra_services-team @elastic/kibana-visualizations
Expand Down Expand Up @@ -1844,6 +1844,12 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/x-pack/plugins/security_solution_serverless/public/upselling/sections/endpoint_management @elastic/security-defend-workflows
/x-pack/plugins/security_solution_serverless/public/upselling/pages/endpoint_management @elastic/security-defend-workflows
/x-pack/plugins/security_solution_serverless/server/endpoint @elastic/security-defend-workflows
x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/schemas/defend_insights @elastic/security-defend-workflows
x-pack/plugins/elastic_assistant/server/__mocks__/defend_insights_schema.mock.ts @elastic/security-defend-workflows
x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/defend_insights @elastic/security-defend-workflows
x-pack/plugins/elastic_assistant/server/routes/defend_insights @elastic/security-defend-workflows
/x-pack/plugins/security_solution/public/common/components/response_actions @elastic/security-defend-workflows
/x-pack/plugins/security_solution_serverless/public/upselling/pages/osquery_automated_response_actions.tsx @elastic/security-defend-workflows

## Security Solution sub teams - security-telemetry (Data Engineering)
x-pack/plugins/security_solution/server/usage/ @elastic/security-data-analytics
Expand Down
2 changes: 1 addition & 1 deletion .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ paths-ignore:
- test
- x-pack/plugins/canvas/scripts
- x-pack/plugins/cloud_security_posture/common/scripts
- x-pack/plugins/elastic_assistant/scripts
- x-pack/solutions/security/plugins/elastic_assistant/scripts
- x-pack/plugins/event_log/scripts
- x-pack/plugins/fleet/scripts
- x-pack/plugins/lists/scripts
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 @@ -557,7 +557,7 @@ Plugin server-side only. Plugin has three main functions:
|This plugin implements (server) APIs used to render the content of the Data Quality dashboard.


|{kib-repo}blob/{branch}/x-pack/plugins/elastic_assistant/README.md[elasticAssistant]
|{kib-repo}blob/{branch}/x-pack/solutions/security/plugins/elastic_assistant/README.md[elasticAssistant]
|This plugin implements (only) server APIs for the Elastic AI Assistant.


Expand Down
2 changes: 1 addition & 1 deletion oas_docs/scripts/merge_ess_oas.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const { REPO_ROOT } = require('@kbn/repo-info');
`${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/platform/packages/shared/kbn-elastic-assistant-common/docs/openapi/ess/*.schema.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/osquery/docs/openapi/ess/*.schema.yaml`,
],
outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.yaml`,
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@
"@kbn/ecs-data-quality-dashboard": "link:x-pack/solutions/security/packages/ecs_data_quality_dashboard",
"@kbn/ecs-data-quality-dashboard-plugin": "link:x-pack/plugins/ecs_data_quality_dashboard",
"@kbn/elastic-agent-utils": "link:packages/kbn-elastic-agent-utils",
"@kbn/elastic-assistant": "link:x-pack/packages/kbn-elastic-assistant",
"@kbn/elastic-assistant-common": "link:x-pack/packages/kbn-elastic-assistant-common",
"@kbn/elastic-assistant-plugin": "link:x-pack/plugins/elastic_assistant",
"@kbn/elastic-assistant": "link:x-pack/platform/packages/shared/kbn-elastic-assistant",
"@kbn/elastic-assistant-common": "link:x-pack/platform/packages/shared/kbn-elastic-assistant-common",
"@kbn/elastic-assistant-plugin": "link:x-pack/solutions/security/plugins/elastic_assistant",
"@kbn/elasticsearch-client-plugin": "link:test/plugin_functional/plugins/elasticsearch_client_plugin",
"@kbn/elasticsearch-client-xpack-plugin": "link:x-pack/test/plugin_api_integration/plugins/elasticsearch_client",
"@kbn/embeddable-enhanced-plugin": "link:x-pack/plugins/embeddable_enhanced",
Expand Down Expand Up @@ -606,7 +606,7 @@
"@kbn/kibana-usage-collection-plugin": "link:src/plugins/kibana_usage_collection",
"@kbn/kibana-utils-plugin": "link:src/plugins/kibana_utils",
"@kbn/kubernetes-security-plugin": "link:x-pack/plugins/kubernetes_security",
"@kbn/langchain": "link:x-pack/packages/kbn-langchain",
"@kbn/langchain": "link:x-pack/platform/packages/shared/kbn-langchain",
"@kbn/language-documentation": "link:src/platform/packages/private/kbn-language-documentation",
"@kbn/lens-config-builder-example-plugin": "link:x-pack/examples/lens_config_builder_example",
"@kbn/lens-embeddable-utils": "link:packages/kbn-lens-embeddable-utils",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-babel-preset/styled_components_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ module.exports = {
/x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/,
/x-pack[\/\\]packages[\/\\]elastic_assistant[\/\\]/,
/x-pack[\/\\]solutions[\/\\]security[\/\\]packages[\/\\]ecs_data_quality_dashboard[\/\\]/,
/x-pack[\/\\]platform[\/\\]packages[\/\\]shared[\/\\]kbn-elastic-assistant[\/\\]/,
],
};
16 changes: 8 additions & 8 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -798,12 +798,12 @@
"@kbn/ecs-data-quality-dashboard-plugin/*": ["x-pack/plugins/ecs_data_quality_dashboard/*"],
"@kbn/elastic-agent-utils": ["packages/kbn-elastic-agent-utils"],
"@kbn/elastic-agent-utils/*": ["packages/kbn-elastic-agent-utils/*"],
"@kbn/elastic-assistant": ["x-pack/packages/kbn-elastic-assistant"],
"@kbn/elastic-assistant/*": ["x-pack/packages/kbn-elastic-assistant/*"],
"@kbn/elastic-assistant-common": ["x-pack/packages/kbn-elastic-assistant-common"],
"@kbn/elastic-assistant-common/*": ["x-pack/packages/kbn-elastic-assistant-common/*"],
"@kbn/elastic-assistant-plugin": ["x-pack/plugins/elastic_assistant"],
"@kbn/elastic-assistant-plugin/*": ["x-pack/plugins/elastic_assistant/*"],
"@kbn/elastic-assistant": ["x-pack/platform/packages/shared/kbn-elastic-assistant"],
"@kbn/elastic-assistant/*": ["x-pack/platform/packages/shared/kbn-elastic-assistant/*"],
"@kbn/elastic-assistant-common": ["x-pack/platform/packages/shared/kbn-elastic-assistant-common"],
"@kbn/elastic-assistant-common/*": ["x-pack/platform/packages/shared/kbn-elastic-assistant-common/*"],
"@kbn/elastic-assistant-plugin": ["x-pack/solutions/security/plugins/elastic_assistant"],
"@kbn/elastic-assistant-plugin/*": ["x-pack/solutions/security/plugins/elastic_assistant/*"],
"@kbn/elasticsearch-client-plugin": ["test/plugin_functional/plugins/elasticsearch_client_plugin"],
"@kbn/elasticsearch-client-plugin/*": ["test/plugin_functional/plugins/elasticsearch_client_plugin/*"],
"@kbn/elasticsearch-client-xpack-plugin": ["x-pack/test/plugin_api_integration/plugins/elasticsearch_client"],
Expand Down Expand Up @@ -1128,8 +1128,8 @@
"@kbn/kibana-utils-plugin/*": ["src/plugins/kibana_utils/*"],
"@kbn/kubernetes-security-plugin": ["x-pack/plugins/kubernetes_security"],
"@kbn/kubernetes-security-plugin/*": ["x-pack/plugins/kubernetes_security/*"],
"@kbn/langchain": ["x-pack/packages/kbn-langchain"],
"@kbn/langchain/*": ["x-pack/packages/kbn-langchain/*"],
"@kbn/langchain": ["x-pack/platform/packages/shared/kbn-langchain"],
"@kbn/langchain/*": ["x-pack/platform/packages/shared/kbn-langchain/*"],
"@kbn/language-documentation": ["src/platform/packages/private/kbn-language-documentation"],
"@kbn/language-documentation/*": ["src/platform/packages/private/kbn-language-documentation/*"],
"@kbn/lens-config-builder-example-plugin": ["x-pack/examples/lens_config_builder_example"],
Expand Down
4 changes: 2 additions & 2 deletions x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"xpack.dataUsage": "platform/plugins/private/data_usage",
"xpack.discover": "plugins/discover_enhanced",
"xpack.crossClusterReplication": "platform/plugins/private/cross_cluster_replication",
"xpack.elasticAssistant": "packages/kbn-elastic-assistant",
"xpack.elasticAssistant": "platform/packages/shared/kbn-elastic-assistant",
"xpack.elasticAssistantCommon": "platform/packages/shared/kbn-elastic-assistant-common",
"xpack.elasticAssistantPlugin": "plugins/elastic_assistant",
"xpack.elasticAssistantPlugin": "solutions/security/plugins/elastic_assistant",
"xpack.ecsDataQualityDashboard": "plugins/ecs_data_quality_dashboard",
"xpack.embeddableEnhanced": "plugins/embeddable_enhanced",
"xpack.endpoint": "plugins/endpoint",
Expand Down
23 changes: 0 additions & 23 deletions x-pack/packages/kbn-elastic-assistant-common/jest.config.js

This file was deleted.

23 changes: 0 additions & 23 deletions x-pack/packages/kbn-elastic-assistant/jest.config.js

This file was deleted.

Loading
Loading