Skip to content

Commit

Permalink
Merge branch 'main' into issue_151223
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 28, 2023
2 parents 3b2a94a + 662bd9a commit 24a6667
Show file tree
Hide file tree
Showing 1,704 changed files with 29,413 additions and 12,520 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,4 +359,5 @@ enabled:
- x-pack/performance/journeys/ecommerce_dashboard_saved_search_only.ts
- x-pack/performance/journeys/ecommerce_dashboard_tsvb_gauge_only.ts
- x-pack/performance/journeys/dashboard_listing_page.ts
- x-pack/performance/journeys/cloud_security_dashboard.ts
- x-pack/test/custom_branding/config.ts
2 changes: 1 addition & 1 deletion .buildkite/pipelines/code_coverage/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ steps:
- command: .buildkite/scripts/steps/code_coverage/ingest.sh
label: 'Merge and Ingest'
agents:
queue: c2-16
queue: n2-4-spot
depends_on:
- jest
- jest-integration
Expand Down
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
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/functional/apm_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ APM_CYPRESS_RECORD_KEY="$(retry 5 5 vault read -field=CYPRESS_RECORD_KEY secret/
export JOB=kibana-apm-cypress
IS_FLAKY_TEST_RUNNER=${CLI_COUNT:-0}

# Disable parallel tests and dashboard recording when running them in the flaky test runner
if [[ "$IS_FLAKY_TEST_RUNNER" -ne 1 ]]; then
#Enabling cypress dashboard recording when PR is labeled with `apm:cypress-record` and we are not using the flaky test runner
if [[ "$IS_FLAKY_TEST_RUNNER" -ne 1 ]] && is_pr_with_label "apm:cypress-record"; then
CYPRESS_ARGS="--record --key "$APM_CYPRESS_RECORD_KEY" --parallel --ci-build-id "${BUILDKITE_BUILD_ID}""
else
CYPRESS_ARGS=""
Expand Down
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
}
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/storybooks/build_and_upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const STORYBOOKS = [
'cloud_chat',
'coloring',
'chart_icons',
'content_management_plugin',
'content_management_examples',
'controls',
'custom_integrations',
'dashboard_enhanced',
Expand Down
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
11 changes: 7 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ x-pack/examples/alerting_example @elastic/response-ops
x-pack/test/functional_with_es_ssl/plugins/alerts @elastic/response-ops
x-pack/plugins/alerting @elastic/response-ops
packages/kbn-alerts @elastic/security-solution
packages/kbn-alerts-as-data-utils @elastic/response-ops
x-pack/test/alerting_api_integration/common/plugins/alerts_restricted @elastic/response-ops
packages/kbn-alerts-ui-shared @elastic/response-ops
packages/kbn-ambient-common-types @elastic/kibana-operations
Expand Down Expand Up @@ -82,6 +83,7 @@ packages/kbn-config-mocks @elastic/kibana-core
packages/kbn-config-schema @elastic/kibana-core
src/plugins/console @elastic/platform-deployment-management
packages/content-management/content_editor @elastic/appex-sharedux
examples/content_management_examples @elastic/appex-sharedux
src/plugins/content_management @elastic/appex-sharedux
packages/content-management/table_list @elastic/appex-sharedux
examples/controls_example @elastic/kibana-presentation
Expand Down Expand Up @@ -336,6 +338,7 @@ x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin
src/plugins/event_annotation @elastic/kibana-visualizations
x-pack/test/plugin_api_integration/plugins/event_log @elastic/response-ops
x-pack/plugins/event_log @elastic/response-ops
packages/kbn-expandable-flyout @elastic/security-threat-hunting-investigations
packages/kbn-expect @elastic/kibana-operations
x-pack/examples/exploratory_view_example @elastic/uptime
src/plugins/expression_error @elastic/kibana-presentation
Expand Down Expand Up @@ -760,9 +763,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 +911,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 @@ -1040,7 +1044,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
1 change: 1 addition & 0 deletions .github/workflows/skip-failed-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: ./actions/permission-check
with:
permission: admin
teams: appex-qa
token: ${{secrets.GITHUB_TOKEN}}

- name: Checkout kibana-operations
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"embeddableExamples": "examples/embeddable_examples",
"esQuery": "packages/kbn-es-query/src",
"esUi": "src/plugins/es_ui_shared",
"expandableFlyout": "packages/kbn-expandable-flyout",
"expressionError": "src/plugins/expression_error",
"expressionGauge": "src/plugins/chart_expressions/expression_gauge",
"expressionHeatmap": "src/plugins/chart_expressions/expression_heatmap",
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-23
date: 2023-02-28
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-23
date: 2023-02-28
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-23
date: 2023-02-28
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
Loading

0 comments on commit 24a6667

Please sign in to comment.