Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into expire-time-follow-up
Browse files Browse the repository at this point in the history
  • Loading branch information
dplumlee committed Feb 27, 2023
2 parents 024fff3 + 69420e1 commit e843f54
Show file tree
Hide file tree
Showing 1,418 changed files with 26,152 additions and 11,825 deletions.
38 changes: 38 additions & 0 deletions .buildkite/pipelines/scalability/api_capacity_testing_daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
steps:
- label: 'Pre-Build'
command: .buildkite/scripts/lifecycle/pre_build.sh
agents:
queue: kibana-default

- wait

- label: 'Build Kibana Distribution and Plugins'
command: .buildkite/scripts/steps/build_kibana.sh
agents:
queue: n2-16-spot
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3

- label: ':kibana: APIs Capacity Tests'
command: .buildkite/scripts/steps/scalability/api_capacity_testing.sh
agents:
queue: kb-static-scalability
depends_on: build
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '*'
limit: 1

- wait: ~
continue_on_failure: true

- label: 'Post-Build'
command: .buildkite/scripts/lifecycle/post_build.sh
agents:
queue: kibana-default
28 changes: 28 additions & 0 deletions .buildkite/scripts/steps/scalability/api_capacity_testing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

source .buildkite/scripts/steps/scalability/util.sh

bootstrap_kibana

KIBANA_LOAD_TESTING_DIR="${KIBANA_DIR}/kibana-load-testing"
# These tests are running on static workers so we must delete previous build, load runner and scalability artifacts
rm -rf "${KIBANA_BUILD_LOCATION}"
rm -rf "${KIBANA_LOAD_TESTING_DIR}"

echo "--- Download the build artifacts"
.buildkite/scripts/download_build_artifacts.sh

echo "--- Clone kibana-load-testing repo and compile project"
mkdir -p "${KIBANA_LOAD_TESTING_DIR}" && cd "${KIBANA_LOAD_TESTING_DIR}"
checkout_and_compile_load_runner

echo "--- Run single apis capacity tests"
cd "$KIBANA_DIR"
node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "x-pack/test/scalability/apis"

echo "--- Upload test results"
upload_test_results
51 changes: 10 additions & 41 deletions .buildkite/scripts/steps/scalability/benchmarking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

#.buildkite/scripts/bootstrap.sh
echo "--- yarn kbn reset && yarn kbn bootstrap"
yarn kbn reset && yarn kbn bootstrap
source .buildkite/scripts/steps/scalability/util.sh

bootstrap_kibana

GCS_BUCKET="gs://kibana-performance/scalability-tests"
GCS_ARTIFACTS_REL="gcs_artifacts"
Expand Down Expand Up @@ -37,51 +37,20 @@ download_artifacts() {
tar -xzf "${LATEST_RUN_ARTIFACTS_DIR}/scalability_traces.tar.gz"
}

checkout_and_compile_load_runner() {
mkdir -p "${KIBANA_LOAD_TESTING_DIR}" && cd "${KIBANA_LOAD_TESTING_DIR}"

if [[ ! -d .git ]]; then
git init
git remote add origin https://github.com/elastic/kibana-load-testing.git
fi
git fetch origin --depth 1 "main"
git reset --hard FETCH_HEAD

KIBANA_LOAD_TESTING_GIT_COMMIT="$(git rev-parse HEAD)"
export KIBANA_LOAD_TESTING_GIT_COMMIT

mvn -q test-compile
echo "Set 'GATLING_PROJECT_PATH' env var for ScalabilityTestRunner"
export GATLING_PROJECT_PATH="$(pwd)"
}

upload_test_results() {
cd "${KIBANA_DIR}"
echo "Upload server logs as build artifacts"
tar -czf server-logs.tar.gz data/ftr_servers_logs/**/*
buildkite-agent artifact upload server-logs.tar.gz
echo "--- Upload Gatling reports as build artifacts"
tar -czf "scalability_test_report.tar.gz" --exclude=simulation.log -C kibana-load-testing/target gatling
buildkite-agent artifact upload "scalability_test_report.tar.gz"
cd "${LATEST_RUN_ARTIFACTS_DIR}"
echo "Upload scalability traces as build artifacts"
buildkite-agent artifact upload "scalability_traces.tar.gz"
}

echo "--- Clone kibana-load-testing repo and compile project"
mkdir -p "${KIBANA_LOAD_TESTING_DIR}" && cd "${KIBANA_LOAD_TESTING_DIR}"
checkout_and_compile_load_runner

cd "$KIBANA_DIR"
echo "--- Download the latest artifacts from single user performance pipeline"
download_artifacts

if [ "$BUILDKITE_PIPELINE_SLUG" == "kibana-scalability-benchmarking-1" ]; then
echo "--- Run journey scalability tests"
node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "scalability_traces/server"
else
echo "--- Run single apis capacity tests"
node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "x-pack/test/scalability/apis"
fi
echo "--- Run journey scalability tests"
node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "scalability_traces/server"

echo "--- Upload test results"
upload_test_results

cd "${LATEST_RUN_ARTIFACTS_DIR}"
echo "Upload scalability traces as build artifacts"
buildkite-agent artifact upload "scalability_traces.tar.gz"
39 changes: 39 additions & 0 deletions .buildkite/scripts/steps/scalability/util.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

checkout_and_compile_load_runner() {
if [[ ! -d .git ]]; then
git init
git remote add origin https://github.com/elastic/kibana-load-testing.git
fi
git fetch origin --depth 1 "main"
git reset --hard FETCH_HEAD

KIBANA_LOAD_TESTING_GIT_COMMIT="$(git rev-parse HEAD)"
export KIBANA_LOAD_TESTING_GIT_COMMIT

mvn -q test-compile
echo "Set 'GATLING_PROJECT_PATH' env var for ScalabilityTestRunner"
export GATLING_PROJECT_PATH="$(pwd)"
}

upload_test_results() {
echo "Upload server logs as build artifacts"
tar -czf server-logs.tar.gz data/ftr_servers_logs/**/*
buildkite-agent artifact upload server-logs.tar.gz
echo "--- Upload Gatling reports as build artifacts"
tar -czf "scalability_test_report.tar.gz" --exclude=simulation.log -C kibana-load-testing/target gatling
buildkite-agent artifact upload "scalability_test_report.tar.gz"
}

bootstrap_kibana() {
echo "--- yarn kbn bootstrap --force-install"
if ! yarn kbn bootstrap --force-install; then
echo "bootstrap failed, trying again in 15 seconds"
sleep 15

rm -rf node_modules

echo "--- yarn kbn reset && yarn kbn bootstrap, attempt 2"
yarn kbn reset && yarn kbn bootstrap
fi
}
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,11 @@ module.exports = {
name: 'lodash/fp/assocPath',
message: 'Please use @kbn/safer-lodash-set/fp/assocPath instead',
},
{
name: 'lodash/fp/template',
message:
'lodash.template is unsafe, and not compatible with our content security policy.',
},
{
name: 'lodash/template',
message:
Expand Down
12 changes: 8 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -760,9 +760,9 @@ packages/kbn-yarn-lock-validator @elastic/kibana-operations
# /x-pack/test/observability_functional @elastic/unified-observability

# Home/Overview/Landing Pages
/x-pack/plugins/observability/public/pages/home @elastic/observability-design @elastic/observability-ui
/x-pack/plugins/observability/public/pages/landing @elastic/observability-design @elastic/observability-ui
/x-pack/plugins/observability/public/pages/overview @elastic/observability-design @elastic/observability-ui
/x-pack/plugins/observability/public/pages/home @elastic/observability-ui
/x-pack/plugins/observability/public/pages/landing @elastic/observability-ui
/x-pack/plugins/observability/public/pages/overview @elastic/observability-ui

# Actionable Observability
/x-pack/test/observability_functional @elastic/actionable-observability
Expand Down Expand Up @@ -908,6 +908,7 @@ packages/kbn-yarn-lock-validator @elastic/kibana-operations
# Kibana Platform Security
/.github/codeql @elastic/kibana-security
/.github/workflows/codeql.yml @elastic/kibana-security
/src/dev/eslint/security_eslint_rule_tests.ts @elastic/kibana-security
/src/plugins/telemetry/server/config/telemetry_labels.ts @elastic/kibana-security
/test/interactive_setup_api_integration/ @elastic/kibana-security
/test/interactive_setup_functional/ @elastic/kibana-security
Expand Down Expand Up @@ -1003,6 +1004,8 @@ packages/kbn-yarn-lock-validator @elastic/kibana-operations

/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/public/common/components/charts @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/public/common/components/grouping @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/public/common/components/header_page @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/public/common/components/header_section @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/public/common/components/inspect @elastic/security-threat-hunting-explore
Expand Down Expand Up @@ -1038,7 +1041,6 @@ packages/kbn-yarn-lock-validator @elastic/kibana-operations
/x-pack/plugins/security_solution/server/lib/detection_engine/migrations @elastic/security-detections-response-alerts
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview @elastic/security-detections-response-alerts
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types @elastic/security-detections-response-alerts
/x-pack/plugins/security_solution/server/lib/detection_engine/signals @elastic/security-detections-response-alerts
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index @elastic/security-detections-response-alerts
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals @elastic/security-detections-response-alerts

Expand Down Expand Up @@ -1192,6 +1194,8 @@ x-pack/test/threat_intelligence_cypress @elastic/protections-experience
# Changes to translation files should not ping code reviewers
x-pack/plugins/translations/translations

x-pack/performance @elastic/appex-qa

####
## These rules are always last so they take ultimate priority over everything else
####
Expand Down
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the actions plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/advanced_settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
description: API docs for the advancedSettings plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/aiops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops
title: "aiops"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiops plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
14 changes: 14 additions & 0 deletions api_docs/alerting.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -5988,6 +5988,20 @@
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "alerting",
"id": "def-common.RuleAction.uuid",
"type": "string",
"tags": [],
"label": "uuid",
"description": [],
"signature": [
"string | undefined"
],
"path": "x-pack/plugins/alerting/common/rule.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "alerting",
"id": "def-common.RuleAction.group",
Expand Down
4 changes: 2 additions & 2 deletions api_docs/alerting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting
title: "alerting"
image: https://source.unsplash.com/400x175/?github
description: API docs for the alerting plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
---
import alertingObj from './alerting.devdocs.json';
Expand All @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 486 | 1 | 475 | 40 |
| 487 | 1 | 476 | 40 |

## Client

Expand Down
2 changes: 1 addition & 1 deletion api_docs/apm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm
title: "apm"
image: https://source.unsplash.com/400x175/?github
description: API docs for the apm plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/banners.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners
title: "banners"
image: https://source.unsplash.com/400x175/?github
description: API docs for the banners plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners']
---
import bannersObj from './banners.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/bfetch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch
title: "bfetch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the bfetch plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch']
---
import bfetchObj from './bfetch.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/canvas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas
title: "canvas"
image: https://source.unsplash.com/400x175/?github
description: API docs for the canvas plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas']
---
import canvasObj from './canvas.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases
title: "cases"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cases plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases']
---
import casesObj from './cases.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/charts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts
title: "charts"
image: https://source.unsplash.com/400x175/?github
description: API docs for the charts plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts']
---
import chartsObj from './charts.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud
title: "cloud"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloud plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud']
---
import cloudObj from './cloud.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud_chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat
title: "cloudChat"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudChat plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat']
---
import cloudChatObj from './cloud_chat.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud_data_migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration
title: "cloudDataMigration"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudDataMigration plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration']
---
import cloudDataMigrationObj from './cloud_data_migration.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud_defend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend
title: "cloudDefend"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudDefend plugin
date: 2023-02-22
date: 2023-02-26
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend']
---
import cloudDefendObj from './cloud_defend.devdocs.json';
Expand Down

0 comments on commit e843f54

Please sign in to comment.