Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into machine-learning-fi…
Browse files Browse the repository at this point in the history
…elds
  • Loading branch information
nikitaindik committed Dec 18, 2024
2 parents 1014b62 + 87440cf commit 8c786d5
Show file tree
Hide file tree
Showing 2,538 changed files with 46,849 additions and 44,305 deletions.
20 changes: 20 additions & 0 deletions .buildkite/pipelines/pull_request/renovate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10
agents:
machineType: n2-standard-2

- wait

- command: .buildkite/scripts/steps/renovate.sh
label: 'Renovate validation'
agents:
machineType: n2-highcpu-8
preemptible: true
key: renovate_validation
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
20 changes: 14 additions & 6 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ const getPipeline = (filename: string, removeSteps = true) => {
return;
}

const onlyRunQuickChecks = await areChangesSkippable([/^renovate\.json$/], REQUIRED_PATHS);
if (onlyRunQuickChecks) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/renovate.yml', false));
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));
console.log('Isolated changes to renovate.json. Skipping main PR pipeline.');
return;
}

pipeline.push(getAgentImageConfig({ returnYaml: true }));
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false));

Expand Down Expand Up @@ -242,7 +250,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
/^packages\/kbn-securitysolution-.*/,
/^x-pack\/plugins\/alerting/,
/^x-pack\/plugins\/data_views\/common/,
/^x-pack\/plugins\/lists/,
/^x-pack\/solutions\/security\/plugins\/lists/,
/^x-pack\/plugins\/rule_registry\/common/,
/^x-pack\/solutions\/security\/plugins\/security_solution/,
/^x-pack\/solutions\/security\/plugins\/security_solution_ess/,
Expand Down Expand Up @@ -298,10 +306,10 @@ const getPipeline = (filename: string, removeSteps = true) => {
/^packages\/kbn-search-types/,
/^packages\/kbn-securitysolution-.*/,
/^src\/platform\/packages\/shared\/kbn-securitysolution-ecs/,
/^packages\/kbn-securitysolution-io-ts-alerting-types/,
/^packages\/kbn-securitysolution-io-ts-list-types/,
/^packages\/kbn-securitysolution-list-hooks/,
/^packages\/kbn-securitysolution-t-grid/,
/^x-pack\/solutions\/security\/packages\/kbn-securitysolution-io-ts-alerting-types/,
/^x-pack\/solutions\/security\/packages\/kbn-securitysolution-io-ts-list-types/,
/^x-pack\/solutions\/security\/packages\/kbn-securitysolution-list-hooks/,
/^x-pack\/solutions\/security\/packages\/kbn-securitysolution-t-grid/,
/^packages\/kbn-ui-theme/,
/^packages\/kbn-utility-types/,
/^packages\/react/,
Expand All @@ -327,7 +335,7 @@ const getPipeline = (filename: string, removeSteps = true) => {
/^x-pack\/plugins\/cases/,
/^x-pack\/plugins\/data_views\/common/,
/^x-pack\/solutions\/security\/plugins\/elastic_assistant/,
/^x-pack\/plugins\/lists/,
/^x-pack\/solutions\/security\/plugins\/lists/,
/^x-pack\/plugins\/rule_registry\/common/,
/^x-pack\/solutions\/security\/plugins\/security_solution/,
/^x-pack\/solutions\/security\/plugins\/security_solution_ess/,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ echo -e "\n[Security Solution OpenAPI Code Generation] OpenAPI Common Package\n"
(cd packages/kbn-openapi-common && yarn openapi:generate)

echo -e "\n[Security Solution OpenAPI Code Generation] Lists Common Package\n"
(cd packages/kbn-securitysolution-lists-common && yarn openapi:generate)
(cd x-pack/solutions/security/packages/kbn-securitysolution-lists-common && yarn openapi:generate)

echo -e "\n[Security Solution OpenAPI Code Generation] Exceptions Common Package\n"
(cd packages/kbn-securitysolution-exceptions-common && yarn openapi:generate)
(cd x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common && yarn openapi:generate)

echo -e "\n[Security Solution OpenAPI Code Generation] Endpoint Exceptions Common Package\n"
(cd packages/kbn-securitysolution-endpoint-exceptions-common && yarn openapi:generate)
(cd x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common && yarn openapi:generate)

echo -e "\n[Security Solution OpenAPI Code Generation] Security Solution Plugin\n"
(cd x-pack/solutions/security/plugins/security_solution && yarn openapi:generate)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ echo -e "\n[Security Solution OpenAPI Bundling] Entity Analytics API\n"
(cd x-pack/solutions/security/plugins/security_solution && yarn openapi:bundle:entity-analytics)

echo -e "\n[Security Solution OpenAPI Bundling] Lists API\n"
(cd packages/kbn-securitysolution-lists-common && yarn openapi:bundle)
(cd x-pack/solutions/security/packages/kbn-securitysolution-lists-common && yarn openapi:bundle)

echo -e "\n[Security Solution OpenAPI Bundling] Exceptions API\n"
(cd packages/kbn-securitysolution-exceptions-common && yarn openapi:bundle)
(cd x-pack/solutions/security/packages/kbn-securitysolution-exceptions-common && yarn openapi:bundle)

echo -e "\n[Security Solution OpenAPI Bundling] Endpoint Exceptions API\n"
(cd packages/kbn-securitysolution-endpoint-exceptions-common && yarn openapi:bundle)
(cd x-pack/solutions/security/packages/kbn-securitysolution-endpoint-exceptions-common && yarn openapi:bundle)

echo -e "\n[Security Solution OpenAPI Bundling] Endpoint Management API\n"
(cd x-pack/solutions/security/plugins/security_solution && yarn openapi:bundle:endpoint-management)
Expand Down
6 changes: 6 additions & 0 deletions .buildkite/scripts/steps/renovate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail

echo '--- Renovate: validation'
.buildkite/scripts/steps/checks/renovate.sh
21 changes: 12 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1343,8 +1343,8 @@ module.exports = {
{
// front end and common typescript and javascript files only
files: [
'x-pack/plugins/lists/public/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/lists/common/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/plugins/lists/public/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/plugins/lists/common/**/*.{js,mjs,ts,tsx}',
],
rules: {
'import/no-nodejs-modules': 'error',
Expand All @@ -1360,14 +1360,20 @@ module.exports = {
},
{
// typescript for /public and /common
files: ['x-pack/plugins/lists/public/*.{ts,tsx}', 'x-pack/plugins/lists/common/*.{ts,tsx}'],
files: [
'x-pack/solutions/security/plugins/lists/public/*.{ts,tsx}',
'x-pack/solutions/security/plugins/lists/common/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-for-in-array': 'error',
},
},
{
// typescript for /public and /common
files: ['x-pack/plugins/lists/public/*.{ts,tsx}', 'x-pack/plugins/lists/common/*.{ts,tsx}'],
files: [
'x-pack/solutions/security/plugins/lists/public/*.{ts,tsx}',
'x-pack/solutions/security/plugins/lists/common/*.{ts,tsx}',
],
plugins: ['react'],
env: {
jest: true,
Expand Down Expand Up @@ -1425,7 +1431,7 @@ module.exports = {
},
},
{
files: ['x-pack/plugins/lists/public/**/!(*.test).{js,mjs,ts,tsx}'],
files: ['x-pack/solutions/security/plugins/lists/public/**/!(*.test).{js,mjs,ts,tsx}'],
plugins: ['react-perf'],
rules: {
'react-perf/jsx-no-new-object-as-prop': 'error',
Expand All @@ -1436,7 +1442,7 @@ module.exports = {
},
{
// typescript and javascript for front and back
files: ['x-pack/plugins/lists/**/*.{js,mjs,ts,tsx}'],
files: ['x-pack/solutions/security/plugins/lists/**/*.{js,mjs,ts,tsx}'],
plugins: ['eslint-plugin-node'],
env: {
jest: true,
Expand Down Expand Up @@ -1997,9 +2003,6 @@ module.exports = {
},
{
files: [
// logsShared depends on o11y/private plugins, but platform plugins depend on it
'x-pack/plugins/observability_solution/logs_shared/**',

// TODO @kibana/operations
'scripts/create_observability_rules.js', // is importing "@kbn/observability-alerting-test-data" (observability/private)
'src/cli_setup/**', // is importing "@kbn/interactive-setup-plugin" (platform/private)
Expand Down
Loading

0 comments on commit 8c786d5

Please sign in to comment.