Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:elastic/kibana into add-timeslice-m…
Browse files Browse the repository at this point in the history
…etric-indicator
simianhacker committed Oct 11, 2023
2 parents 4852b6d + e02669d commit 0843e0b
Showing 993 changed files with 41,165 additions and 3,513 deletions.
10 changes: 10 additions & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
@@ -13,6 +13,9 @@ disabled:
- x-pack/test/functional_with_es_ssl/config.base.ts
- x-pack/test/api_integration/config.ts
- x-pack/test/fleet_api_integration/config.base.ts
- x-pack/test/security_solution_api_integration/config/ess/config.base.ts
- x-pack/test/security_solution_api_integration/config/serverless/config.base.ts


# QA suites that are run out-of-band
- x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js
@@ -425,6 +428,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group4.ts
- x-pack/test_serverless/functional/test_suites/security/config.ts
- x-pack/test_serverless/functional/test_suites/security/config.examples.ts
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group3.ts
@@ -448,3 +452,9 @@ enabled:
- x-pack/performance/journeys/apm_service_inventory.ts
- x-pack/test/custom_branding/config.ts
- x-pack/test/profiling_api_integration/cloud/config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/ess.config.ts




Original file line number Diff line number Diff line change
@@ -226,6 +226,10 @@ export async function pickTestGroupRunOrder() {
.filter(Boolean)
: ['build'];

const FTR_EXTRA_ARGS: Record<string, string> = process.env.FTR_EXTRA_ARGS
? { FTR_EXTRA_ARGS: process.env.FTR_EXTRA_ARGS }
: {};

const { defaultQueue, ftrConfigsByQueue } = getEnabledFtrConfigs(FTR_CONFIG_PATTERNS);

const ftrConfigsIncluded = LIMIT_CONFIG_TYPE.includes('functional');
@@ -464,6 +468,7 @@ export async function pickTestGroupRunOrder() {
},
env: {
FTR_CONFIG_GROUP_KEY: key,
...FTR_EXTRA_ARGS,
},
retry: {
automatic: [
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote/

### Parameters for this job:
# PUBLISH_DOCKER_TAG: if set to 1/true, passing runs will promote the tested ES Serverless tag to latest-verified.
# PUBLISH_MANIFEST: if set to 1/true, passing runs will upload the manifest attesting what (kibana + es) combination was used in the test
# SKIP_VERIFICATION: if set to 1/true, it will skip running all tests
# SKIP_CYPRESS: if set to 1/true, it will skip running the cypress tests
# FTR_EXTRA_ARGS: a string argument, if passed, it will be forwarded verbatim to the FTR run script
# ES_SERVERLESS_IMAGE: the tag for the docker image to test, in the form of docker.elastic.co/elasticsearch-ci/elasticsearch-serverless:$TAG
# BUILDKITE_COMMIT: the commit hash of the kibana branch to test

agents:
queue: kibana-default

@@ -24,7 +34,6 @@ steps:
queue: n2-16-spot
key: build
depends_on: pre-build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 60
retry:
automatic:
@@ -35,10 +44,12 @@ steps:
command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh
agents:
queue: kibana-default
depends_on: build
timeout_in_minutes: 10
env:
FTR_CONFIGS_SCRIPT: 'TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/ftr_configs.sh'
FTR_CONFIG_PATTERNS: '**/test_serverless/**'
FTR_EXTRA_ARGS: '$FTR_EXTRA_ARGS'
LIMIT_CONFIG_TYPE: 'functional'
retry:
automatic:
@@ -47,6 +58,7 @@ steps:

- command: .buildkite/scripts/steps/functional/security_serverless.sh
label: 'Serverless Security Cypress Tests'
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
queue: n2-4-spot
depends_on: build
@@ -59,6 +71,7 @@ steps:

- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Serverless Explore - Security Solution Cypress Tests'
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
queue: n2-4-spot
depends_on: build
@@ -71,6 +84,7 @@ steps:

- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Serverless Investigations - Security Solution Cypress Tests'
if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'"
agents:
queue: n2-4-spot
depends_on: build
7 changes: 7 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
@@ -270,6 +270,13 @@ steps:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/archive_so_migration_snapshot.sh target/plugin_so_types_snapshot.json
label: 'Extract Saved Object migration plugin types'
agents:
queue: n2-4-spot
artifact_paths:
"target/plugin_so_types_snapshot.json"

- wait: ~
continue_on_failure: true

19 changes: 19 additions & 0 deletions .buildkite/scripts/steps/archive_so_migration_snapshot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail

.buildkite/scripts/bootstrap.sh

SO_MIGRATIONS_SNAPSHOT_FOLDER=kibana-so-types-snapshots
SNAPSHOT_FILE_PATH="${1:-target/plugin_so_types_snapshot.json}"

echo "--- Creating snapshot of Saved Object migration info"
node scripts/snapshot_plugin_types --outputPath "$SNAPSHOT_FILE_PATH"

echo "--- Uploading as ${BUILDKITE_COMMIT}.json"
SNAPSHOT_PATH="${SO_MIGRATIONS_SNAPSHOT_FOLDER}/${BUILDKITE_COMMIT}.json"
gsutil cp "$SNAPSHOT_FILE_PATH" "gs://$SNAPSHOT_PATH"

buildkite-agent annotate --context so_migration_snapshot --style success \
'Saved Object type snapshot is available at <a href="https://storage.cloud.google.com/'"$SNAPSHOT_PATH"'">'"$SNAPSHOT_PATH"'</a>'

echo "Success!"
Original file line number Diff line number Diff line change
@@ -19,7 +19,12 @@ else
SOURCE_IMAGE="$BASE_ES_SERVERLESS_REPO:$SOURCE_IMAGE_OR_TAG"
fi

echo "--- Promoting ${SOURCE_IMAGE_OR_TAG} to ':latest-verified'"
if [[ "${PUBLISH_DOCKER_TAG:-}" =~ ^(1|true)$ ]]; then
echo "--- Promoting ${SOURCE_IMAGE_OR_TAG} to ':latest-verified'"
else
echo "--- Skipping ES Serverless image because PUBLISH_DOCKER_TAG is not set"
exit 0
fi

echo "Re-tagging $SOURCE_IMAGE -> $TARGET_IMAGE"

@@ -63,7 +68,7 @@ echo "Image push to $TARGET_IMAGE successful."
echo "Promotion successful! Henceforth, thou shall be named Sir $TARGET_IMAGE"

MANIFEST_UPLOAD_PATH="Skipped"
if [[ "${UPLOAD_MANIFEST:-}" =~ ^(1|true)$ && "$SOURCE_IMAGE_OR_TAG" =~ ^git-[0-9a-fA-F]{12}$ ]]; then
if [[ "${PUBLISH_MANIFEST:-}" =~ ^(1|true)$ && "$SOURCE_IMAGE_OR_TAG" =~ ^git-[0-9a-fA-F]{12}$ ]]; then
echo "--- Uploading latest-verified manifest to GCS"
cat << EOT >> $MANIFEST_FILE_NAME
{
@@ -84,7 +89,7 @@ EOT
gsutil acl ch -u AllUsers:R "gs://$ES_SERVERLESS_BUCKET/$MANIFEST_FILE_NAME"
MANIFEST_UPLOAD_PATH="<a href=\"https://storage.googleapis.com/$ES_SERVERLESS_BUCKET/$MANIFEST_FILE_NAME\">$MANIFEST_FILE_NAME</a>"

elif [[ "${UPLOAD_MANIFEST:-}" =~ ^(1|true)$ ]]; then
elif [[ "${PUBLISH_MANIFEST:-}" =~ ^(1|true)$ ]]; then
echo "--- Skipping upload of latest-verified manifest to GCS, ES Serverless build tag is not pointing to a hash"
elif [[ "$SOURCE_IMAGE_OR_TAG" =~ ^git-[0-9a-fA-F]{12}$ ]]; then
echo "--- Skipping upload of latest-verified manifest to GCS, flag was not provided"
10 changes: 8 additions & 2 deletions .buildkite/scripts/steps/test/ftr_configs.sh
Original file line number Diff line number Diff line change
@@ -11,6 +11,9 @@ if [ "$FTR_CONFIG_GROUP_KEY" == "" ] && [ "$BUILDKITE_PARALLEL_JOB" == "" ]; the
exit 1
fi

EXTRA_ARGS=${FTR_EXTRA_ARGS:-}
test -z "$EXTRA_ARGS" || buildkite-agent meta-data set "ftr-extra-args" "$EXTRA_ARGS"

export JOB="$FTR_CONFIG_GROUP_KEY"

FAILED_CONFIGS_KEY="${BUILDKITE_STEP_ID}${FTR_CONFIG_GROUP_KEY}"
@@ -49,15 +52,18 @@ while read -r config; do
continue;
fi

echo "--- $ node scripts/functional_tests --bail --config $config"
FULL_COMMAND="node scripts/functional_tests --bail --config $config $EXTRA_ARGS"
echo "--- $ $FULL_COMMAND"

start=$(date +%s)

# prevent non-zero exit code from breaking the loop
set +e;
node ./scripts/functional_tests \
--bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config="$config"
--config="$config" \
"$EXTRA_ARGS"
lastCode=$?
set -e;

2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -606,6 +606,8 @@ module.exports = {
'x-pack/test_serverless/**/config*.ts',
'x-pack/test_serverless/*/test_suites/**/*',
'x-pack/test/profiling_api_integration/**/*.ts',
'x-pack/test/security_solution_api_integration/*/test_suites/**/*',
'x-pack/test/security_solution_api_integration/**/config*.ts',
],
rules: {
'import/no-default-export': 'off',
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1302,6 +1302,8 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/exceptions @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/overview @elastic/security-detection-engine
x-pack/test/security_solution_api_integration/test_suites/detections_response/exceptions @elastic/security-detection-engine
x-pack/test/security_solution_api_integration/test_suites/detections_response/rule_creation @elastic/security-detection-engine

## Security Threat Intelligence - Under Security Platform
/x-pack/plugins/security_solution/public/common/components/threat_match @elastic/security-detection-engine
@@ -1323,6 +1325,8 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib

/x-pack/plugins/security_solution/server/routes @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/plugins/security_solution/server/utils @elastic/security-detections-response @elastic/security-threat-hunting
x-pack/test/security_solution_api_integration/test_suites/detections_response/utils @elastic/security-detections-response


## Security Solution sub teams - security-defend-workflows
/x-pack/plugins/security_solution/public/management/ @elastic/security-defend-workflows
@@ -1388,6 +1392,10 @@ x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_en
/x-pack/plugins/security_solution/public/cloud_security_posture @elastic/kibana-cloud-security-posture
/x-pack/test/api_integration/apis/cloud_security_posture/ @elastic/kibana-cloud-security-posture
/x-pack/test/cloud_security_posture_functional/ @elastic/kibana-cloud-security-posture
/x-pack/test/cloud_security_posture_api/ @elastic/kibana-cloud-security-posture
/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/ @elastic/kibana-cloud-security-posture
/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.ts @elastic/kibana-cloud-security-posture
/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/ @elastic/kibana-cloud-security-posture

# Security Solution onboarding tour
/x-pack/plugins/security_solution/public/common/components/guided_onboarding @elastic/security-threat-hunting-explore
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/advanced_settings.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/aiops.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/alerting.devdocs.json
Original file line number Diff line number Diff line change
@@ -3785,7 +3785,7 @@
"section": "def-common.DataView",
"text": "DataView"
},
">; getDefaultDataView: (options?: { displayErrors?: boolean | undefined; refreshFields?: boolean | undefined; }) => Promise<",
">; defaultDataViewExists: () => Promise<boolean>; getDefaultDataView: (options?: { displayErrors?: boolean | undefined; refreshFields?: boolean | undefined; }) => Promise<",
{
"pluginId": "dataViews",
"scope": "common",
2 changes: 1 addition & 1 deletion api_docs/alerting.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
---
import alertingObj from './alerting.devdocs.json';
8 changes: 7 additions & 1 deletion api_docs/apm.devdocs.json
Original file line number Diff line number Diff line change
@@ -6128,6 +6128,8 @@
"<{ probability: ",
"Type",
"<number, number, unknown>; }>, ",
"IntersectionC",
"<[",
"TypeC",
"<{ documentType: ",
"UnionC",
@@ -6163,6 +6165,10 @@
"RollupInterval",
".None>]>; }>, ",
"TypeC",
"<{ useDurationSummary: ",
"Type",
"<boolean, boolean, unknown>; }>]>, ",
"TypeC",
"<{ environment: ",
"UnionC",
"<[",
@@ -6201,7 +6207,7 @@
"ApmDocumentType",
".TransactionEvent; rollupInterval: ",
"RollupInterval",
"; } & { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ",
"; } & { useDurationSummary: boolean; } & { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ",
"Branded",
"<string, ",
{
2 changes: 1 addition & 1 deletion api_docs/apm.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/apm_data_access.mdx
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess
title: "apmDataAccess"
image: https://source.unsplash.com/400x175/?github
description: API docs for the apmDataAccess plugin
date: 2023-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess']
---
import apmDataAccessObj from './apm_data_access.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/asset_manager.mdx
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager
title: "assetManager"
image: https://source.unsplash.com/400x175/?github
description: API docs for the assetManager plugin
date: 2023-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager']
---
import assetManagerObj from './asset_manager.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/banners.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners']
---
import bannersObj from './banners.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/bfetch.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch']
---
import bfetchObj from './bfetch.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/canvas.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas']
---
import canvasObj from './canvas.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/cases.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases']
---
import casesObj from './cases.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/charts.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts']
---
import chartsObj from './charts.devdocs.json';
2 changes: 1 addition & 1 deletion api_docs/cloud.mdx
Original file line number Diff line number Diff line change
@@ -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-10-10
date: 2023-10-11
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud']
---
import cloudObj from './cloud.devdocs.json';
Loading

0 comments on commit 0843e0b

Please sign in to comment.