Skip to content

Commit

Permalink
Merge branch 'main' into log-flyout-highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
achyutjhunjhunwala authored Nov 10, 2023
2 parents 5546d5d + 41cacd1 commit 563675f
Show file tree
Hide file tree
Showing 966 changed files with 9,113 additions and 3,569 deletions.
20 changes: 10 additions & 10 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ disabled:
- x-pack/test/security_solution_api_integration/config/ess/config.base.ts
- x-pack/test/security_solution_api_integration/config/serverless/config.base.ts
- x-pack/test/security_solution_endpoint/config.base.ts
- x-pack/test/security_solution_endpoint_api_int/config.base.ts

# QA suites that are run out-of-band
- x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js
Expand Down Expand Up @@ -227,10 +228,6 @@ enabled:
- x-pack/test/detection_engine_api_integration/security_and_spaces/group5/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/group10/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/prebuilt_rules/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/bundled_prebuilt_rules_package/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/large_prebuilt_rules_package/config.ts
- x-pack/test/detection_engine_api_integration/security_and_spaces/update_prebuilt_rules_package/config.ts
- x-pack/test/disable_ems/config.ts
- x-pack/test/encrypted_saved_objects_api_integration/config.ts
- x-pack/test/examples/config.ts
Expand Down Expand Up @@ -385,6 +382,7 @@ enabled:
- x-pack/test/security_functional/user_profiles.config.ts
- x-pack/test/security_functional/expired_session.config.ts
- x-pack/test/security_solution_endpoint_api_int/config.ts
- x-pack/test/security_solution_endpoint_api_int/serverless.config.ts
- x-pack/test/security_solution_endpoint/endpoint.config.ts
- x-pack/test/security_solution_endpoint/serverless.endpoint.config.ts
- x-pack/test/security_solution_endpoint/integrations.config.ts
Expand Down Expand Up @@ -464,9 +462,11 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/alerts/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/ess.config.ts






- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/management/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/management/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/bundled_prebuilt_rules_package/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/bundled_prebuilt_rules_package/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/large_prebuilt_rules_package/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/large_prebuilt_rules_package/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/update_prebuilt_rules_package/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules/update_prebuilt_rules_package/configs/ess.config.ts
67 changes: 67 additions & 0 deletions .buildkite/pipelines/security_solution/api_integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
steps:
- label: Running exception_workflows:runner:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh exception_workflows:qa:serverless
key: exception_workflows:runner:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 2

- label: Running exception_operators_date_numeric_types:runner:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh exception_operators_date_numeric_types:qa:serverless
key: exception_operators_date_numeric_types:runner:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 2

- label: Running exception_operators_keyword_text_long:runner:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh exception_operators_keyword_text_long:qa:serverless
key: exception_operators_keyword_text_long:runner:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 2

- label: Running exception_operators_ips_text_array:runner:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh exception_operators_ips_text_array:qa:serverless
key: exception_operators_ips_text_array:runner:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '1'
limit: 2

- label: Running rule_creation:runner:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh rule_creation:qa:serverless
key: rule_creation:runner:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '1'
limit: 2

- label: Running actions:qa:serverless
command: .buildkite/scripts/pipelines/security_solution_quality_gate/api-integration-tests.sh actions:qa:serverless
key: actions:qa:serverless
agents:
queue: n2-4-spot
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '1'
limit: 2

18 changes: 18 additions & 0 deletions .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ export KIBANA_BASE_BRANCH="$KIBANA_PKG_BRANCH"
KIBANA_PKG_VERSION="$(jq -r .version "$KIBANA_DIR/package.json")"
export KIBANA_PKG_VERSION

# Detects and exports the final target branch when using a merge queue
if [[ "${BUILDKITE_BRANCH:-}" == "gh-readonly-queue"* ]]; then
# removes gh-readonly-queue/
BKBRANCH_WITHOUT_GH_MQ_PREFIX="${BUILDKITE_BRANCH#gh-readonly-queue/}"

# extracts target mqueue branch
MERGE_QUEUE_TARGET_BRANCH=${BKBRANCH_WITHOUT_GH_MQ_PREFIX%/*}
else
MERGE_QUEUE_TARGET_BRANCH=""
fi
export MERGE_QUEUE_TARGET_BRANCH

# Exports BUILDKITE_BRANCH_MERGE_QUEUE which will use the value from MERGE_QUEUE_TARGET_BRANCH if defined otherwise
# will fallback to BUILDKITE_BRANCH.
BUILDKITE_BRANCH_MERGE_QUEUE="${MERGE_QUEUE_TARGET_BRANCH:-${BUILDKITE_BRANCH:-}}"
export BUILDKITE_BRANCH_MERGE_QUEUE


BUILDKITE_AGENT_GCP_REGION=""
if [[ "$(curl -is metadata.google.internal || true)" ]]; then
# projects/1003139005402/zones/us-central1-a -> us-central1-a -> us-central1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/bin/bash
if [ -z "$1" ]
then
echo "No target script from the package.json file, is supplied"
exit 1
fi

source .buildkite/scripts/common/util.sh
.buildkite/scripts/bootstrap.sh

buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" "true"

echo "--- Serverless Security Second Quality Gate"
cd x-pack/test/security_solution_api_integration
set +e

QA_API_KEY=$(retry 5 5 vault read -field=qa_api_key secret/kibana-issues/dev/security-solution-qg-enc-key)

# Generate a random 5-digit number
random_number=$((10000 + $RANDOM % 90000))
ENVIRONMENT_DETAILS=$(curl --location 'https://global.qa.cld.elstc.co/api/v1/serverless/projects/security' \
--header "Authorization: ApiKey $QA_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"name": "ftr-integration-tests-'$random_number'",
"region_id": "aws-eu-west-1"}' | jq '.')
NAME=$(echo $ENVIRONMENT_DETAILS | jq -r '.name')
ID=$(echo $ENVIRONMENT_DETAILS | jq -r '.id')
ES_URL=$(echo $ENVIRONMENT_DETAILS | jq -r '.endpoints.elasticsearch')
KB_URL=$(echo $ENVIRONMENT_DETAILS | jq -r '.endpoints.kibana')

# Wait five seconds for the project to appear
sleep 5

# Resetting the credentials of the elastic user in the project
CREDS_BODY=$(curl -s --location --request POST "https://global.qa.cld.elstc.co/api/v1/serverless/projects/security/$ID/_reset-credentials" \
--header "Authorization: ApiKey $QA_API_KEY" \
--header 'Content-Type: application/json' | jq '.')
USERNAME=$(echo $CREDS_BODY | jq -r '.username')
PASSWORD=$(echo $CREDS_BODY | jq -r '.password')
AUTH=$(echo "$USERNAME:$PASSWORD")

# Checking if Elasticsearch has status green
while : ; do
STATUS=$(curl -u $AUTH --location "$ES_URL:443/_cluster/health?wait_for_status=green&timeout=50s" | jq -r '.status')
if [ "$STATUS" != "green" ]; then
echo "Sleeping for 40s to wait for ES status to be green..."
sleep 40
else
echo "Elasticsearch has status green."
break
fi
done

# Checking if Kibana is available
while : ; do
STATUS=$(curl -u $AUTH --location "$KB_URL:443/api/status" | jq -r '.status.overall.level')
if [ "$STATUS" != "available" ]; then
echo "Sleeping for 15s to wait for Kibana to be available..."
sleep 15
else
echo "Kibana is available."
break
fi
done

# Removing the https:// part of the url provided in order to use it in the command below.
FORMATTED_ES_URL="${ES_URL/https:\/\//}"
FORMATTED_KB_URL="${KB_URL/https:\/\//}"

# Find a way to remove this in the future
# This is used in order to wait for the environment to be ready.
sleep 150

TEST_CLOUD=1 TEST_ES_URL="https://elastic:$PASSWORD@$FORMATTED_ES_URL:443" TEST_KIBANA_URL="https://elastic:$PASSWORD@$FORMATTED_KB_URL:443" yarn run $1
cmd_status=$?
echo "Exit code with status: $cmd_status"

curl --location --request DELETE "https://global.qa.cld.elstc.co/api/v1/serverless/projects/security/$ID" \
--header "Authorization: ApiKey $QA_API_KEY"

exit $cmd_status
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/artifacts/docker_context.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ KIBANA_DOCKER_CONTEXT="${KIBANA_DOCKER_CONTEXT:="default"}"

echo "--- Create contexts"
mkdir -p target
node scripts/build --skip-initialize --skip-generic-folders --skip-platform-folders --skip-archives --skip-cdn-assets --docker-context-use-local-artifact
node scripts/build --skip-initialize --skip-generic-folders --skip-platform-folders --skip-archives --skip-cdn-assets --docker-context-use-local-artifact "${BUILD_ARGS[@]}"

echo "--- Setup context"
DOCKER_BUILD_FOLDER=$(mktemp -d)
Expand Down
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/cloud/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ else
--skip-generic-folders \
--skip-platform-folders \
--skip-archives \
--skip-cdn-assets \
--docker-images \
--docker-tag-qualifier="$GIT_COMMIT" \
--docker-push \
Expand Down
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ src/plugins/data_view_field_editor @elastic/kibana-data-discovery
src/plugins/data_view_management @elastic/kibana-data-discovery
src/plugins/data_views @elastic/kibana-data-discovery
x-pack/plugins/data_visualizer @elastic/ml-ui
x-pack/plugins/dataset_quality @elastic/obs-ux-logs-team
packages/kbn-datemath @elastic/kibana-data-discovery
packages/deeplinks/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations
packages/deeplinks/devtools @elastic/platform-deployment-management
Expand Down Expand Up @@ -1299,6 +1300,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_details @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/rule_management @elastic/security-detection-rule-management
/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules @elastic/security-detection-rule-management

/x-pack/plugins/security_solution/public/common/components/health_truncate_text @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/public/common/components/links_to_docs @elastic/security-detection-rule-management
Expand Down Expand Up @@ -1418,6 +1420,7 @@ x-pack/plugins/security_solution/server/lib/telemetry/ @elastic/security-data-an
## Security Solution sub teams - security-engineering-productivity
/x-pack/test/security_solution_cypress/* @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/cypress/* @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/cypress/tasks/login.ts @elastic/security-engineering-productivity
/x-pack/test/security_solution_cypress/es_archives @elastic/security-engineering-productivity
/x-pack/plugins/security_solution/scripts/run_cypress @MadameSheema @patrykkopycinski @oatkiller @maximpn @banderror

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-11-09
date: 2023-11-10
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-11-09
date: 2023-11-10
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-11-09
date: 2023-11-10
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion 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-11-09
date: 2023-11-10
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
---
import alertingObj from './alerting.devdocs.json';
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-11-09
date: 2023-11-10
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/apm_data_access.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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-11-09
date: 2023-11-10
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess']
---
import apmDataAccessObj from './apm_data_access.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/asset_manager.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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-11-09
date: 2023-11-10
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager']
---
import assetManagerObj from './asset_manager.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-11-09
date: 2023-11-10
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-11-09
date: 2023-11-10
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-11-09
date: 2023-11-10
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-11-09
date: 2023-11-10
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-11-09
date: 2023-11-10
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-11-09
date: 2023-11-10
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud']
---
import cloudObj from './cloud.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-11-09
date: 2023-11-10
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-11-09
date: 2023-11-10
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend']
---
import cloudDefendObj from './cloud_defend.devdocs.json';
Expand Down
Loading

0 comments on commit 563675f

Please sign in to comment.