Skip to content

Commit

Permalink
Merge branch 'main' into 151006/fix-multi-metric-color-problem
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 24, 2023
2 parents a8fac3e + 9652a84 commit f6e0a25
Show file tree
Hide file tree
Showing 1,636 changed files with 40,696 additions and 26,698 deletions.
24 changes: 18 additions & 6 deletions .buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ export async function pickTestGroupRunOrder() {
throw new Error(`invalid FUNCTIONAL_MAX_MINUTES: ${process.env.FUNCTIONAL_MAX_MINUTES}`);
}

/**
* This env variable corresponds to the env stanza within
* https://github.com/elastic/kibana/blob/bc2cb5dc613c3d455a5fed9c54450fd7e46ffd92/.buildkite/pipelines/code_coverage/daily.yml#L17
*
* It is a flag that signals the job for which test runners will be executed.
*
* For example in code coverage pipeline definition, it is "limited"
* to 'unit,integration'. This means FTR tests will not be executed.
*/
const LIMIT_CONFIG_TYPE = process.env.LIMIT_CONFIG_TYPE
? process.env.LIMIT_CONFIG_TYPE.split(',')
.map((t) => t.trim())
Expand Down Expand Up @@ -218,9 +227,10 @@ export async function pickTestGroupRunOrder() {
: ['build'];

const { defaultQueue, ftrConfigsByQueue } = getEnabledFtrConfigs(FTR_CONFIG_PATTERNS);
if (!LIMIT_CONFIG_TYPE.includes('functional')) {
ftrConfigsByQueue.clear();
}

const ftrConfigsIncluded = LIMIT_CONFIG_TYPE.includes('functional');

if (!ftrConfigsIncluded) ftrConfigsByQueue.clear();

const jestUnitConfigs = LIMIT_CONFIG_TYPE.includes('unit')
? globby.sync(['**/jest.config.js', '!**/__fixtures__/**'], {
Expand Down Expand Up @@ -377,9 +387,11 @@ export async function pickTestGroupRunOrder() {
Fs.writeFileSync('jest_run_order.json', JSON.stringify({ unit, integration }, null, 2));
bk.uploadArtifacts('jest_run_order.json');

// write the config for functional steps to an artifact that can be used by the individual functional jobs
Fs.writeFileSync('ftr_run_order.json', JSON.stringify(ftrRunOrder, null, 2));
bk.uploadArtifacts('ftr_run_order.json');
if (ftrConfigsIncluded) {
// write the config for functional steps to an artifact that can be used by the individual functional jobs
Fs.writeFileSync('ftr_run_order.json', JSON.stringify(ftrRunOrder, null, 2));
bk.uploadArtifacts('ftr_run_order.json');
}

// upload the step definitions to Buildkite
bk.uploadSteps(
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/code_coverage/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ steps:
queue: kibana-default
env:
FTR_CONFIGS_DEPS: ''
# LIMIT_CONFIG_TYPE: 'unit,functional,integration'
LIMIT_CONFIG_TYPE: 'unit,integration'
JEST_UNIT_SCRIPT: '.buildkite/scripts/steps/code_coverage/jest.sh'
JEST_INTEGRATION_SCRIPT: '.buildkite/scripts/steps/code_coverage/jest_integration.sh'
Expand All @@ -25,6 +24,5 @@ steps:
depends_on:
- jest
- jest-integration
# - ftr-configs
timeout_in_minutes: 30
key: ingest
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
30 changes: 0 additions & 30 deletions .buildkite/scripts/steps/code_coverage/node_scripts.sh

This file was deleted.

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
}
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/storybooks/build_and_upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const STORYBOOKS = [
'cloud_chat',
'coloring',
'chart_icons',
'content_management_plugin',
'controls',
'custom_integrations',
'dashboard_enhanced',
Expand Down
11 changes: 8 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ packages/core/usage-data/core-usage-data-base-server-internal @elastic/kibana-co
packages/core/usage-data/core-usage-data-server @elastic/kibana-core
packages/core/usage-data/core-usage-data-server-internal @elastic/kibana-core
packages/core/usage-data/core-usage-data-server-mocks @elastic/kibana-core
packages/core/versioning/core-version-http-server @elastic/kibana-core
x-pack/plugins/cross_cluster_replication @elastic/platform-deployment-management
packages/kbn-crypto @elastic/kibana-security
packages/kbn-crypto-browser @elastic/kibana-core
Expand Down Expand Up @@ -759,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 @@ -1002,6 +1003,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 @@ -1191,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-21
date: 2023-02-24
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-21
date: 2023-02-24
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-21
date: 2023-02-24
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-21
date: 2023-02-24
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-21
date: 2023-02-24
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.devdocs.json';
Expand Down
Loading

0 comments on commit f6e0a25

Please sign in to comment.