Skip to content

Commit

Permalink
Merge branch 'main' into index_management-disable_actions_for_serverl…
Browse files Browse the repository at this point in the history
…ess2
  • Loading branch information
sabarasaba committed Jul 12, 2023
2 parents 40a3d39 + 85a99c9 commit afe9d07
Show file tree
Hide file tree
Showing 1,418 changed files with 25,091 additions and 16,546 deletions.
3 changes: 2 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ disabled:
- x-pack/test/defend_workflows_cypress/cli_config.ts
- x-pack/test/defend_workflows_cypress/config.ts
- x-pack/test/defend_workflows_cypress/endpoint_config.ts
- x-pack/test/defend_workflows_cypress/visual_config.ts
- x-pack/plugins/observability_onboarding/e2e/ftr_config_open.ts
- x-pack/plugins/observability_onboarding/e2e/ftr_config_runner.ts
- x-pack/plugins/observability_onboarding/e2e/ftr_config.ts
Expand All @@ -49,6 +48,8 @@ disabled:
- x-pack/plugins/apm/ftr_e2e/ftr_config_open.ts
- x-pack/plugins/apm/ftr_e2e/ftr_config_run.ts
- x-pack/plugins/apm/ftr_e2e/ftr_config.ts
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_runner.ts
- x-pack/plugins/profiling/e2e/ftr_config_open.ts
- x-pack/plugins/profiling/e2e/ftr_config_runner.ts
- x-pack/plugins/profiling/e2e/ftr_config.ts
Expand Down
16 changes: 16 additions & 0 deletions .buildkite/pipelines/pull_request/defend_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,19 @@ steps:
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/defend_workflows_vagrant.sh
label: 'Defend Workflows Endpoint Cypress Tests'
agents:
queue: n2-16-virt
depends_on: build
timeout_in_minutes: 120
parallelism: 6
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"
26 changes: 26 additions & 0 deletions .buildkite/scripts/build_kibana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,32 @@ if is_pr_with_label "ci:build-cloud-image"; then
EOF
fi

if is_pr_with_label "ci:build-serverless-image"; then
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12}
node scripts/build \
--skip-initialize \
--skip-generic-folders \
--skip-platform-folders \
--skip-archives \
--docker-images \
--docker-namespace="kibana-ci" \
--docker-tag="pr-$BUILDKITE_PULL_REQUEST-$GIT_ABBREV_COMMIT" \
--docker-push \
--skip-docker-ubi \
--skip-docker-ubuntu \
--skip-docker-cloud \
--skip-docker-contexts
docker logout docker.elastic.co

SERVERLESS_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-serverless)
buildkite-agent meta-data set pr_comment:deploy_cloud:head "* Kibana Serverless Image: \`$SERVERLESS_IMAGE\`"
cat << EOF | buildkite-agent annotate --style "info" --context kibana-serverless-image
Kibana Serverless Image: \`$SERVERLESS_IMAGE\`
EOF
fi

echo "--- Archive Kibana Distribution"
linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')"
installDir="$KIBANA_DIR/install/kibana"
Expand Down
11 changes: 0 additions & 11 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,6 @@ steps:
SERVICE_COMMIT_HASH: $GIT_ABBREV_COMMIT
REMOTE_SERVICE_CONFIG: https://raw.githubusercontent.com/elastic/serverless-gitops/main/gen/gpctl/kibana/config.yaml
- trigger: serverless-gitops-update-stack-image-tag
async: true
label: ":argo: Update image tag for Kibana using the legacy script (used in QA/Staging)"
branches: main
build:
env:
IMAGE_TAG: "git-$GIT_ABBREV_COMMIT"
SERVICE: kibana-controller
NAMESPACE: kibana-ci
IMAGE_NAME: kibana-serverless
COMMIT_MESSAGE: "gitops: update kibana tag to elastic/kibana@$GIT_ABBREV_COMMIT"
EOF

else
Expand Down
11 changes: 9 additions & 2 deletions .buildkite/scripts/steps/functional/apm_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ 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}
GH_APM_TEAM_LABEL="Team:APM"

#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
if (! is_pr); then
echo "--- Add GH labels to buildkite metadata"
ts-node .buildkite/scripts/steps/add_gh_labels_to_bk_metadata.ts BUILDKITE_MESSAGE true
GH_ON_MERGE_LABELS="$(buildkite-agent meta-data get gh_labels)"
fi

# Enabling cypress dashboard recording when PR is labeled with `apm:cypress-record` and we are not using the flaky test runner OR on merge with Team:APM label applied
if ([[ "$IS_FLAKY_TEST_RUNNER" -ne 1 ]] && is_pr_with_label "apm:cypress-record") || ([[ $GH_ON_MERGE_LABELS == *"$GH_APM_TEAM_LABEL"* ]]); then
CYPRESS_ARGS="--record --key "$APM_CYPRESS_RECORD_KEY" --parallel --ci-build-id "${BUILDKITE_BUILD_ID}""
else
CYPRESS_ARGS=""
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/scripts/steps/functional/common_cypress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

Xvfb -screen 0 1680x946x24 :99 &
export DISPLAY=:99
5 changes: 1 addition & 4 deletions .buildkite/scripts/steps/functional/defend_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-defend-workflows-cypress
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

Xvfb -screen 0 1680x946x24 :99 &

export DISPLAY=:99

echo "--- Defend Workflows Cypress tests"

yarn --cwd x-pack/plugins/security_solution cypress:dw:run
14 changes: 14 additions & 0 deletions .buildkite/scripts/steps/functional/defend_workflows_vagrant.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-defend-workflows-endpoint-cypress
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}


echo "--- Defend Workflows Endpoint Cypress tests"

yarn --cwd x-pack/plugins/security_solution cypress:dw:endpoint:run
5 changes: 1 addition & 4 deletions .buildkite/scripts/steps/functional/osquery_cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
set -euo pipefail

source .buildkite/scripts/common/util.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

.buildkite/scripts/bootstrap.sh
node scripts/build_kibana_platform_plugins.js

Xvfb :99 -screen 0 1600x1200x24 &

export DISPLAY=:99

export JOB=kibana-osquery-cypress

echo "--- Osquery Cypress tests"
Expand Down
5 changes: 1 addition & 4 deletions .buildkite/scripts/steps/functional/response_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

Xvfb -screen 0 1680x946x24 :99 &

export DISPLAY=:99

echo "--- Response Ops Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:run:respops
5 changes: 1 addition & 4 deletions .buildkite/scripts/steps/functional/response_ops_cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

Xvfb -screen 0 1680x946x24 :99 &

export DISPLAY=:99

echo "--- Response Ops Cases Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:run:cases
5 changes: 1 addition & 4 deletions .buildkite/scripts/steps/functional/security_solution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

Xvfb :99 -screen 0 1600x1200x24 &

export DISPLAY=:99

echo "--- Security Solution tests (Chrome)"

yarn --cwd x-pack/plugins/security_solution cypress:run
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}


Xvfb :99 -screen 0 1600x1200x24 &

export DISPLAY=:99

echo "--- Explore Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:explore:run
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}


Xvfb :99 -screen 0 1600x1200x24 &

export DISPLAY=:99

echo "--- Investigations Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:investigations:run
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/functional/serverless_ftr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ elif [[ "$SERVERLESS_ENVIRONMENT" == "observability" ]]; then
SERVERLESS_CONFIGS=(
"x-pack/test_serverless/api_integration/test_suites/observability/config.ts"
"x-pack/test_serverless/functional/test_suites/observability/config.ts"
"x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts"
)
elif [[ "$SERVERLESS_ENVIRONMENT" == "security" ]]; then
SERVERLESS_CONFIGS=(
Expand Down
5 changes: 1 addition & 4 deletions .buildkite/scripts/steps/functional/threat_intelligence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-threat-intelligence-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

Xvfb :99 -screen 0 1600x1200x24 &

export DISPLAY=:99

echo "--- Threat Intelligence tests (Chrome)"

yarn --cwd x-pack/plugins/threat_intelligence cypress:run
8 changes: 6 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ x-pack/plugins/infra/server/lib/alerting @elastic/actionable-observability

# Additional plugins and packages maintained by the ML team.
/x-pack/test/accessibility/apps/transform.ts @elastic/ml-ui
/x-pack/test/api_integration/apis/aiops/ @elastic/ml-ui
/x-pack/test/api_integration/apis/transform/ @elastic/ml-ui
/x-pack/test/api_integration_basic/apis/transform/ @elastic/ml-ui
/x-pack/test/functional/apps/transform/ @elastic/ml-ui
Expand Down Expand Up @@ -1118,8 +1119,8 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/common/detection_engine/rule_monitoring @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/detection_engine/rule_schema @elastic/security-detection-rule-management @elastic/security-detection-engine

/x-pack/plugins/security_solution/cypress/test_plans/detection_response/prebuilt_rules @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/cypress/test_plans/detection_response/rule_management @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/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 All @@ -1138,6 +1139,8 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/public/detections/mitre @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/public/rules @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/public/entity_analytics @elastic/security-detection-engine


/x-pack/plugins/security_solution/server/lib/detection_engine/fleet_integrations @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules @elastic/security-detection-rule-management
Expand All @@ -1164,6 +1167,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/cypress/e2e/data_sources @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/e2e/exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/e2e/value_lists @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/e2e/entity_analytics @elastic/security-detection-engine

/x-pack/plugins/security_solution/common/detection_engine/rule_exceptions @elastic/security-detection-engine

Expand Down
14 changes: 14 additions & 0 deletions api_docs/actions.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3004,6 +3004,20 @@
"path": "x-pack/plugins/actions/server/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "actions",
"id": "def-server.InMemoryConnector.config",
"type": "Uncategorized",
"tags": [],
"label": "config",
"description": [],
"signature": [
"Config"
],
"path": "x-pack/plugins/actions/server/types.ts",
"deprecated": false,
"trackAdoption": false
}
],
"initialIsOpen": false
Expand Down
4 changes: 2 additions & 2 deletions 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-07-10
date: 2023-07-12
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.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 |
|-------------------|-----------|------------------------|-----------------|
| 271 | 10 | 266 | 27 |
| 272 | 10 | 267 | 27 |

## Client

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-07-10
date: 2023-07-12
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-07-10
date: 2023-07-12
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
4 changes: 2 additions & 2 deletions api_docs/alerting.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7766,12 +7766,12 @@
{
"parentPluginId": "alerting",
"id": "def-common.Rule.scheduledTaskId",
"type": "string",
"type": "CompoundType",
"tags": [],
"label": "scheduledTaskId",
"description": [],
"signature": [
"string | undefined"
"string | null | undefined"
],
"path": "x-pack/plugins/alerting/common/rule.ts",
"deprecated": false,
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-07-10
date: 2023-07-12
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-07-10
date: 2023-07-12
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.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-07-10
date: 2023-07-12
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager']
---
import assetManagerObj from './asset_manager.devdocs.json';
Expand Down
Loading

0 comments on commit afe9d07

Please sign in to comment.