Sustainable Kibana Architecture: Move modules owned by @elastic/security-defend-workflows (#202840)

This commit is contained in:
Gerard Soldevila 2024-12-13 12:08:36 +01:00 committed by GitHub
parent 42704af65d
commit 42af4e60a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
509 changed files with 95 additions and 93 deletions

View file

@ -350,7 +350,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
if (
((await doAnyChangesMatch([
/^x-pack\/plugins\/osquery/,
/^x-pack\/platform\/plugins\/shared\/osquery/,
/^x-pack\/test\/osquery_cypress/,
/^x-pack\/plugins\/security_solution/,
])) ||

View file

@ -18,7 +18,7 @@ buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" "true
source .buildkite/scripts/pipelines/security_solution_quality_gate/prepare_vault_entries.sh
cd x-pack/plugins/osquery
cd x-pack/platform/plugins/shared/osquery
set +e
export BK_ANALYTICS_API_KEY=$(vault_get security-solution-quality-gate serverless-cypress-defend-workflows)

View file

@ -6,5 +6,5 @@ source .buildkite/scripts/common/util.sh
echo --- Osquery OpenAPI Code Generation
(cd x-pack/plugins/osquery && yarn openapi:generate)
(cd x-pack/platform/plugins/shared/osquery && yarn openapi:generate)
check_for_changed_files "yarn openapi:generate" true

View file

@ -10,7 +10,7 @@ export JOB=kibana-osquery-cypress
echo "--- Osquery Cypress tests"
cd x-pack/plugins/osquery
cd x-pack/platform/plugins/shared/osquery
set +e
yarn cypress:run; status=$?; yarn junit:merge || :; exit $status

View file

@ -12,4 +12,4 @@ buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'fals
echo "--- Osquery Cypress tests, burning changed specs (Chrome)"
yarn --cwd x-pack/plugins/osquery cypress:changed-specs-only
yarn --cwd x-pack/platform/plugins/shared/osquery cypress:changed-specs-only

View file

@ -10,7 +10,7 @@ export JOB=kibana-osquery-cypress-serverless
echo "--- Security Osquery Serverless Cypress"
cd x-pack/plugins/osquery
cd x-pack/platform/plugins/shared/osquery
set +e
yarn cypress:serverless:run; status=$?; yarn junit:merge || :; exit $status

View file

@ -31,6 +31,6 @@ echo -e "\n[Security Solution OpenAPI Bundling] Elastic Assistant API\n"
(cd x-pack/packages/kbn-elastic-assistant-common && yarn openapi:bundle)
echo -e "\n[Security Solution OpenAPI Bundling] Osquery API\n"
(cd x-pack/plugins/osquery && yarn openapi:bundle)
(cd x-pack/platform/plugins/shared/osquery && yarn openapi:bundle)
check_for_changed_files "yarn openapi:bundle" true

View file

@ -1786,7 +1786,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
],
plugins: ['react', '@typescript-eslint'],
files: ['x-pack/plugins/osquery/**/*.{js,mjs,ts,tsx}'],
files: ['x-pack/platform/plugins/shared/osquery/**/*.{js,mjs,ts,tsx}'],
rules: {
'padding-line-between-statements': [
'error',
@ -1812,7 +1812,7 @@ module.exports = {
},
{
// typescript and javascript for front end react performance
files: ['x-pack/plugins/osquery/public/**/!(*.test).{js,mjs,ts,tsx}'],
files: ['x-pack/platform/plugins/shared/osquery/public/**/!(*.test).{js,mjs,ts,tsx}'],
plugins: ['react', 'react-perf'],
rules: {
'react-perf/jsx-no-new-object-as-prop': 'error',
@ -2007,7 +2007,7 @@ module.exports = {
'src/dev/build/tasks/install_chromium.ts', // is importing "@kbn/screenshotting-plugin" (platform/private)
// @kbn/osquery-plugin could be categorised as Security, but @kbn/infra-plugin (observability) depends on it!
'x-pack/plugins/osquery/**',
'x-pack/platform/plugins/shared/osquery/**',
// For now, we keep the exception to let tests depend on anythying.
// Ideally, we need to classify the solution specific ones to reduce CI times

4
.github/CODEOWNERS vendored
View file

@ -290,7 +290,6 @@ packages/kbn-apm-synthtrace @elastic/obs-ux-infra_services-team @elastic/obs-ux-
packages/kbn-apm-synthtrace-client @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team
packages/kbn-apm-types @elastic/obs-ux-infra_services-team
packages/kbn-apm-utils @elastic/obs-ux-infra_services-team
packages/kbn-avc-banner @elastic/security-defend-workflows
packages/kbn-axe-config @elastic/kibana-qa
packages/kbn-babel-preset @elastic/kibana-operations
packages/kbn-babel-register @elastic/kibana-operations
@ -619,6 +618,7 @@ src/platform/packages/private/kbn-esql-editor @elastic/kibana-esql
src/platform/packages/private/kbn-language-documentation @elastic/kibana-esql
src/platform/packages/shared/deeplinks/ml @elastic/ml-ui
src/platform/packages/shared/deeplinks/observability @elastic/obs-ux-management-team
src/platform/packages/shared/kbn-avc-banner @elastic/security-defend-workflows
src/platform/packages/shared/kbn-doc-links @elastic/docs
src/platform/packages/shared/kbn-esql-ast @elastic/kibana-esql
src/platform/packages/shared/kbn-esql-utils @elastic/kibana-esql
@ -865,6 +865,7 @@ x-pack/platform/plugins/shared/inference @elastic/appex-ai-infra
x-pack/platform/plugins/shared/integration_assistant @elastic/security-scalability
x-pack/platform/plugins/shared/ml @elastic/ml-ui
x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant @elastic/obs-ai-assistant
x-pack/platform/plugins/shared/osquery @elastic/security-defend-workflows
x-pack/plugins/actions @elastic/response-ops
x-pack/plugins/alerting @elastic/response-ops
x-pack/plugins/asset_inventory @elastic/kibana-cloud-security-posture
@ -932,7 +933,6 @@ x-pack/plugins/observability_solution/observability_shared @elastic/observabilit
x-pack/plugins/observability_solution/profiling @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/profiling_data_access @elastic/obs-ux-infra_services-team
x-pack/plugins/observability_solution/slo @elastic/obs-ux-management-team
x-pack/plugins/osquery @elastic/security-defend-workflows
x-pack/plugins/painless_lab @elastic/kibana-management
x-pack/plugins/remote_clusters @elastic/kibana-management
x-pack/plugins/reporting @elastic/appex-sharedux

View file

@ -81,7 +81,7 @@ paths-ignore:
- x-pack/plugins/lists/scripts
- x-pack/plugins/lists/server/scripts
- x-pack/plugins/observability_solution/*/scripts
- x-pack/plugins/osquery/scripts
- x-pack/platform/plugins/shared/osquery/scripts
- x-pack/plugins/rule_registry/scripts
- x-pack/plugins/security_solution/scripts
- x-pack/solutions/security/plugins/threat_intelligence/scripts

4
.gitignore vendored
View file

@ -98,8 +98,8 @@ npm-debug.log*
# transpiled cypress config
x-pack/plugins/fleet/cypress.config.d.ts
x-pack/plugins/fleet/cypress.config.js
x-pack/plugins/osquery/cypress.config.d.ts
x-pack/plugins/osquery/cypress.config.js
x-pack/platform/plugins/shared/osquery/cypress.config.d.ts
x-pack/platform/plugins/shared/osquery/cypress.config.js
x-pack/plugins/enterprise_search/cypress.config.d.ts
x-pack/plugins/enterprise_search/cypress.config.js
x-pack/plugins/security_solution/public/management/cypress.config.d.ts

View file

@ -7,7 +7,7 @@
"alertingTypes": "packages/kbn-alerting-types",
"apmOss": "src/plugins/apm_oss",
"autocomplete": "packages/kbn-securitysolution-autocomplete/src",
"avcBanner": "packages/kbn-avc-banner/src",
"avcBanner": "src/platform/packages/shared/kbn-avc-banner/src",
"bfetch": "src/plugins/bfetch",
"bfetchError": "packages/kbn-bfetch-error",
"cases": ["packages/kbn-cases-components"],

View file

@ -771,7 +771,7 @@ Elastic.
|A plugin that contains components and utilities shared by all Observability plugins.
|{kib-repo}blob/{branch}/x-pack/plugins/osquery/README.md[osquery]
|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/osquery/README.md[osquery]
|This plugin adds extended support to Security Solution Fleet Osquery integration

View file

@ -31,7 +31,7 @@ const { REPO_ROOT } = require('@kbn/repo-info');
`${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/plugins/osquery/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`,
options: {

View file

@ -29,7 +29,7 @@ const { REPO_ROOT } = require('@kbn/repo-info');
`${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/*.schema.yaml`,
`${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/*.schema.yaml`,
`${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/serverless/*.schema.yaml`,
`${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/serverless/*.schema.yaml`,
`${REPO_ROOT}/x-pack/platform/plugins/shared/osquery/docs/openapi/serverless/*.schema.yaml`,
],
outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.serverless.yaml`,
options: {

View file

@ -193,7 +193,7 @@
"@kbn/application-usage-test-plugin": "link:x-pack/test/usage_collection/plugins/application_usage_test",
"@kbn/asset-inventory-plugin": "link:x-pack/plugins/asset_inventory",
"@kbn/audit-log-plugin": "link:x-pack/test/security_api_integration/plugins/audit_log",
"@kbn/avc-banner": "link:packages/kbn-avc-banner",
"@kbn/avc-banner": "link:src/platform/packages/shared/kbn-avc-banner",
"@kbn/banners-plugin": "link:x-pack/plugins/banners",
"@kbn/bfetch-error": "link:packages/kbn-bfetch-error",
"@kbn/bfetch-explorer-plugin": "link:examples/bfetch_explorer",
@ -715,7 +715,7 @@
"@kbn/open-telemetry-instrumented-plugin": "link:test/common/plugins/otel_metrics",
"@kbn/openapi-common": "link:packages/kbn-openapi-common",
"@kbn/osquery-io-ts-types": "link:src/platform/packages/shared/kbn-osquery-io-ts-types",
"@kbn/osquery-plugin": "link:x-pack/plugins/osquery",
"@kbn/osquery-plugin": "link:x-pack/platform/plugins/shared/osquery",
"@kbn/paertial-results-example-plugin": "link:examples/partial_results_example",
"@kbn/painless-lab-plugin": "link:x-pack/plugins/painless_lab",
"@kbn/palettes": "link:packages/kbn-palettes",

View file

@ -9,6 +9,6 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-avc-banner'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/platform/packages/shared/kbn-avc-banner'],
};

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Before After
Before After

View file

@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [

View file

@ -100,8 +100,8 @@
"@kbn/asset-inventory-plugin/*": ["x-pack/plugins/asset_inventory/*"],
"@kbn/audit-log-plugin": ["x-pack/test/security_api_integration/plugins/audit_log"],
"@kbn/audit-log-plugin/*": ["x-pack/test/security_api_integration/plugins/audit_log/*"],
"@kbn/avc-banner": ["packages/kbn-avc-banner"],
"@kbn/avc-banner/*": ["packages/kbn-avc-banner/*"],
"@kbn/avc-banner": ["src/platform/packages/shared/kbn-avc-banner"],
"@kbn/avc-banner/*": ["src/platform/packages/shared/kbn-avc-banner/*"],
"@kbn/axe-config": ["packages/kbn-axe-config"],
"@kbn/axe-config/*": ["packages/kbn-axe-config/*"],
"@kbn/babel-preset": ["packages/kbn-babel-preset"],
@ -1372,8 +1372,8 @@
"@kbn/optimizer-webpack-helpers/*": ["packages/kbn-optimizer-webpack-helpers/*"],
"@kbn/osquery-io-ts-types": ["src/platform/packages/shared/kbn-osquery-io-ts-types"],
"@kbn/osquery-io-ts-types/*": ["src/platform/packages/shared/kbn-osquery-io-ts-types/*"],
"@kbn/osquery-plugin": ["x-pack/plugins/osquery"],
"@kbn/osquery-plugin/*": ["x-pack/plugins/osquery/*"],
"@kbn/osquery-plugin": ["x-pack/platform/plugins/shared/osquery"],
"@kbn/osquery-plugin/*": ["x-pack/platform/plugins/shared/osquery/*"],
"@kbn/paertial-results-example-plugin": ["examples/partial_results_example"],
"@kbn/paertial-results-example-plugin/*": ["examples/partial_results_example/*"],
"@kbn/painless-lab-plugin": ["x-pack/plugins/painless_lab"],

View file

@ -113,7 +113,7 @@
"packages/observability/logs_overview/src/components"
],
"xpack.osquery": [
"plugins/osquery"
"platform/plugins/shared/osquery"
],
"xpack.painlessLab": "plugins/painless_lab",
"xpack.profiling": [

Some files were not shown because too many files have changed in this diff Show more