Skip to content

Commit

Permalink
Merge branch 'main' into fix/synthetics-functional-tests-unskip
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Dec 2, 2022
2 parents 9e3e804 + e20ab58 commit 0247257
Show file tree
Hide file tree
Showing 1,838 changed files with 30,466 additions and 14,761 deletions.
5 changes: 4 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ disabled:
- x-pack/test/functional/config.base.js
- x-pack/test/detection_engine_api_integration/security_and_spaces/config.base.ts
- x-pack/test/functional_enterprise_search/base_config.ts
- x-pack/test/localization/config.base.ts
- test/server_integration/config.base.js

# QA suites that are run out-of-band
Expand Down Expand Up @@ -116,6 +117,9 @@ enabled:
- test/server_integration/http/ssl/config.js
- test/ui_capabilities/newsfeed_err/config.ts
- x-pack/test/accessibility/config.ts
- x-pack/test/localization/config.ja_jp.ts
- x-pack/test/localization/config.fr_fr.ts
- x-pack/test/localization/config.zh_cn.ts
- x-pack/test/alerting_api_integration/basic/config.ts
- x-pack/test/alerting_api_integration/security_and_spaces/group1/config.ts
- x-pack/test/alerting_api_integration/security_and_spaces/group2/config.ts
Expand Down Expand Up @@ -156,7 +160,6 @@ enabled:
- x-pack/test/functional_embedded/config.ts
- x-pack/test/functional_enterprise_search/without_host_configured.config.ts
- x-pack/test/functional_execution_context/config.ts
- x-pack/test/functional_synthetics/config.js
- x-pack/test/functional_with_es_ssl/config.ts
- x-pack/test/functional/apps/advanced_settings/config.ts
- x-pack/test/functional/apps/aiops/config.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export async function pickTestGroupRunOrder() {
label: 'Jest Tests',
command: getRequiredEnv('JEST_UNIT_SCRIPT'),
parallelism: unit.count,
timeout_in_minutes: 90,
timeout_in_minutes: 60,
key: 'jest',
agents: {
queue: 'n2-4-spot',
Expand All @@ -409,7 +409,7 @@ export async function pickTestGroupRunOrder() {
label: 'Jest Integration Tests',
command: getRequiredEnv('JEST_INTEGRATION_SCRIPT'),
parallelism: integration.count,
timeout_in_minutes: 120,
timeout_in_minutes: 60,
key: 'jest-integration',
agents: {
queue: 'n2-4-spot',
Expand Down Expand Up @@ -446,7 +446,7 @@ export async function pickTestGroupRunOrder() {
({ title, key, queue = defaultQueue }): BuildkiteStep => ({
label: title,
command: getRequiredEnv('FTR_CONFIGS_SCRIPT'),
timeout_in_minutes: 150,
timeout_in_minutes: 60,
agents: {
queue,
},
Expand Down
1 change: 1 addition & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const uploadPipeline = (pipelineContent: string | object) => {

if (
(await doAnyChangesMatch([
/^packages\/kbn-securitysolution-.*/,
/^x-pack\/plugins\/lists/,
/^x-pack\/plugins\/security_solution/,
/^x-pack\/plugins\/timelines/,
Expand Down
118 changes: 3 additions & 115 deletions .buildkite/scripts/steps/functional/performance_playwright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,117 +7,13 @@ source .buildkite/scripts/common/util.sh
is_test_execution_step

.buildkite/scripts/bootstrap.sh

# These tests are running on static workers so we have to make sure we delete previous build of Kibana
rm -rf "$KIBANA_BUILD_LOCATION"
.buildkite/scripts/download_build_artifacts.sh

function is_running {
kill -0 "$1" &>/dev/null
}

# unset env vars defined in other parts of CI for automatic APM collection of
# Kibana. We manage APM config in our FTR config and performance service, and
# APM treats config in the ENV with a very high precedence.
unset ELASTIC_APM_ENVIRONMENT
unset ELASTIC_APM_TRANSACTION_SAMPLE_RATE
unset ELASTIC_APM_SERVER_URL
unset ELASTIC_APM_SECRET_TOKEN
unset ELASTIC_APM_ACTIVE
unset ELASTIC_APM_CONTEXT_PROPAGATION_ONLY
unset ELASTIC_APM_ACTIVE
unset ELASTIC_APM_SERVER_URL
unset ELASTIC_APM_SECRET_TOKEN
unset ELASTIC_APM_GLOBAL_LABELS

# `kill $esPid` doesn't work, seems that kbn-es doesn't listen to signals correctly, this does work
trap 'killall node -q' EXIT

export TEST_ES_URL=http://elastic:changeme@localhost:9200
export TEST_ES_DISABLE_STARTUP=true

echo "--- determining which journeys to run"

journeys=$(buildkite-agent meta-data get "failed-journeys" --default '')
if [ "$journeys" != "" ]; then
echo "re-running failed journeys:${journeys}"
else
paths=()
for path in x-pack/performance/journeys/*; do
paths+=("$path")
done
journeys=$(printf "%s\n" "${paths[@]}")
echo "running discovered journeys:${journeys}"
fi

# track failed journeys here which might get written to metadata
failedJourneys=()

while read -r journey; do
if [ "$journey" == "" ]; then
continue;
fi

echo "--- $journey - 🔎 Start es"

node scripts/es snapshot&
export esPid=$!

# Pings the es server every second for up to 2 minutes until it is green
curl \
--fail \
--silent \
--retry 120 \
--retry-delay 1 \
--retry-connrefused \
-XGET "${TEST_ES_URL}/_cluster/health?wait_for_nodes=>=1&wait_for_status=yellow" \
> /dev/null

echo "✅ ES is ready and will run in the background"

phases=("WARMUP" "TEST")
status=0
for phase in "${phases[@]}"; do
echo "--- $journey - $phase"

export TEST_PERFORMANCE_PHASE="$phase"

set +e
node scripts/functional_tests \
--config "$journey" \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--debug \
--bail
status=$?
set -e

if [ $status -ne 0 ]; then
failedJourneys+=("$journey")
echo "^^^ +++"
echo "❌ FTR failed with status code: $status"
break
fi
done

# remove trap, we're manually shutting down
trap - EXIT;

echo "--- $journey - 🔎 Shutdown ES"
killall node
echo "waiting for $esPid to exit gracefully";

timeout=30 #seconds
dur=0
while is_running $esPid; do
sleep 1;
((dur=dur+1))
if [ $dur -ge $timeout ]; then
echo "es still running after $dur seconds, killing ES and node forcefully";
killall -SIGKILL java
killall -SIGKILL node
sleep 5;
fi
done
done <<< "$journeys"
echo "--- Running performance tests"
node scripts/run_performance.js --kibana-install-dir "$KIBANA_BUILD_LOCATION"

echo "--- Upload journey step screenshots"
JOURNEY_SCREENSHOTS_DIR="${KIBANA_DIR}/data/journey_screenshots"
Expand All @@ -126,11 +22,3 @@ if [ -d "$JOURNEY_SCREENSHOTS_DIR" ]; then
buildkite-agent artifact upload "**/*fullscreen*.png"
cd "$KIBANA_DIR"
fi

echo "--- report/record failed journeys"
if [ "${failedJourneys[*]}" != "" ]; then
buildkite-agent meta-data set "failed-journeys" "$(printf "%s\n" "${failedJourneys[@]}")"

echo "failed journeys: ${failedJourneys[*]}"
exit 1
fi
1 change: 0 additions & 1 deletion .buildkite/scripts/steps/storybooks/build_and_upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const STORYBOOKS = [
'expression_reveal_image',
'expression_shape',
'expression_tagcloud',
'files',
'fleet',
'home',
'infra',
Expand Down
59 changes: 30 additions & 29 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/src/plugins/discover/ @elastic/kibana-data-discovery
/src/plugins/saved_search/ @elastic/kibana-data-discovery
/x-pack/plugins/discover_enhanced/ @elastic/kibana-data-discovery
/x-pack/test/functional/apps/discover/ @elastic/kibana-data-discovery
/test/functional/apps/discover/ @elastic/kibana-data-discovery
/test/functional/apps/context/ @elastic/kibana-data-discovery
/test/api_integration/apis/unified_field_list/ @elastic/kibana-data-discovery
Expand All @@ -22,6 +23,14 @@
/src/plugins/data_view_editor/ @elastic/kibana-data-discovery
/src/plugins/data_view_field_editor/ @elastic/kibana-data-discovery
/src/plugins/data_view_management/ @elastic/kibana-data-discovery
/src/plugins/data/ @elastic/kibana-visualizations @elastic/kibana-data-discovery
/src/plugins/field_formats/ @elastic/kibana-data-discovery
/x-pack/test/search_sessions_integration/ @elastic/kibana-data-discovery
/test/plugin_functional/test_suites/data_plugin @elastic/kibana-data-discovery
/examples/field_formats_example/ @elastic/kibana-data-discovery
/examples/partial_results_example/ @elastic/kibana-data-discovery
/examples/search_examples/ @elastic/kibana-data-discovery
/examples/demo_search/ @elastic/kibana-data-discovery

# Vis Editors
/x-pack/plugins/lens/ @elastic/kibana-visualizations
Expand Down Expand Up @@ -55,29 +64,6 @@
/x-pack/plugins/graph/ @elastic/kibana-visualizations
/x-pack/test/functional/apps/graph @elastic/kibana-visualizations

# Application Services
/examples/dashboard_embeddable_examples/ @elastic/kibana-app-services
/examples/demo_search/ @elastic/kibana-app-services
/examples/developer_examples/ @elastic/kibana-app-services
/examples/embeddable_examples/ @elastic/kibana-app-services
/examples/embeddable_explorer/ @elastic/kibana-app-services
/examples/field_formats_example/ @elastic/kibana-app-services
/examples/partial_results_example/ @elastic/kibana-app-services
/examples/search_examples/ @elastic/kibana-app-services
/src/plugins/data/ @elastic/kibana-visualizations @elastic/kibana-data-discovery
/src/plugins/embeddable/ @elastic/kibana-app-services
/src/plugins/field_formats/ @elastic/kibana-app-services
/src/plugins/inspector/ @elastic/kibana-app-services
/src/plugins/kibana_utils/ @elastic/kibana-app-services
/src/plugins/navigation/ @elastic/kibana-app-services
/src/plugins/inspector/ @elastic/kibana-app-services
/x-pack/plugins/embeddable_enhanced/ @elastic/kibana-app-services
/x-pack/plugins/runtime_fields @elastic/kibana-app-services
/src/plugins/dashboard/public/application/embeddable/viewport/print_media @elastic/kibana-app-services
/x-pack/test/search_sessions_integration/ @elastic/kibana-app-services
/test/plugin_functional/test_suites/panel_actions @elastic/kibana-app-services
/test/plugin_functional/test_suites/data_plugin @elastic/kibana-app-services

# Global Experience

/src/plugins/bfetch/ @elastic/kibana-global-experience
Expand All @@ -86,7 +72,7 @@
/src/plugins/share/ @elastic/kibana-global-experience
/src/plugins/ui_actions/ @elastic/kibana-global-experience
/src/plugins/ui_actions_enhanced/ @elastic/kibana-global-experience

/src/plugins/navigation/ @elastic/kibana-global-experience
/x-pack/plugins/notifications/ @elastic/kibana-global-experience

## Examples
Expand All @@ -95,6 +81,7 @@
/examples/state_containers_examples/ @elastic/kibana-global-experience
/examples/ui_action_examples/ @elastic/kibana-global-experience
/examples/ui_actions_explorer/ @elastic/kibana-global-experience
/examples/developer_examples/ @elastic/kibana-global-experience
/x-pack/examples/ui_actions_enhanced_examples/ @elastic/kibana-global-experience

### Overview Plugin and Packages
Expand All @@ -119,7 +106,7 @@
/docs/setup/configuring-reporting.asciidoc @elastic/kibana-global-experience

### Global Experience Tagging
/src/plugins/saved_objects_tagging_oss @elastic/kibana-global-experience
/src/plugins/saved_objects_tagging_oss @elastic/kibana-global-experience
/x-pack/plugins/saved_objects_tagging/ @elastic/kibana-global-experience
/x-pack/test/saved_object_tagging/ @elastic/kibana-global-experience

Expand Down Expand Up @@ -179,7 +166,7 @@
/x-pack/test/fleet_api_integration @elastic/fleet
/x-pack/test/fleet_cypress @elastic/fleet
/x-pack/test/fleet_functional @elastic/fleet
/src/dev/build/tasks/bundle_fleet_packages.ts
/src/dev/build/tasks/bundle_fleet_packages.ts @elastic/fleet @elastic/kibana-operations

# APM
/x-pack/plugins/apm/ @elastic/apm-ui
Expand Down Expand Up @@ -234,7 +221,14 @@
/test/functional/services/dashboard/ @elastic/kibana-presentation
/x-pack/plugins/canvas/ @elastic/kibana-presentation
/x-pack/plugins/dashboard_enhanced/ @elastic/kibana-presentation
/x-pack/test/functional/apps/canvas/ @elastic/kibana-presentation
/x-pack/test/functional/apps/canvas/ @elastic/kibana-presentation
/examples/dashboard_embeddable_examples/ @elastic/kibana-presentation
/examples/embeddable_examples/ @elastic/kibana-presentation
/examples/embeddable_explorer/ @elastic/kibana-presentation
/src/plugins/embeddable/ @elastic/kibana-presentation
/src/plugins/inspector/ @elastic/kibana-presentation
/x-pack/plugins/embeddable_enhanced/ @elastic/kibana-presentation
/test/plugin_functional/test_suites/panel_actions @elastic/kibana-presentation
#CC# /src/plugins/kibana_react/public/code_editor/ @elastic/kibana-presentation

# Machine Learning
Expand Down Expand Up @@ -416,7 +410,8 @@
/x-pack/plugins/cross_cluster_replication/ @elastic/platform-deployment-management
/x-pack/plugins/index_lifecycle_management/ @elastic/platform-deployment-management
/x-pack/plugins/grokdebugger/ @elastic/platform-deployment-management
/x-pack/plugins/index_management/ @elastic/platform-deployment-management
/x-pack/plugins/index_management/ @elastic/platform-deployment-management
/x-pack/plugins/runtime_fields @elastic/platform-deployment-management
/x-pack/plugins/license_api_guard/ @elastic/platform-deployment-management
/x-pack/plugins/license_management/ @elastic/platform-deployment-management
/x-pack/plugins/painless_lab/ @elastic/platform-deployment-management
Expand Down Expand Up @@ -971,6 +966,7 @@ packages/kbn-plugin-helpers @elastic/kibana-operations
packages/kbn-react-field @elastic/kibana-app-services
packages/kbn-repo-source-classifier @elastic/kibana-operations
packages/kbn-repo-source-classifier-cli @elastic/kibana-operations
packages/kbn-rison @elastic/kibana-operations
packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/actionable-observability @elastic/response-ops
packages/kbn-safer-lodash-set @elastic/kibana-security
packages/kbn-securitysolution-autocomplete @elastic/security-solution-platform
Expand Down Expand Up @@ -1028,9 +1024,13 @@ packages/shared-ux/button/exit_full_screen/types @elastic/kibana-global-experien
packages/shared-ux/card/no_data/impl @elastic/kibana-global-experience
packages/shared-ux/card/no_data/mocks @elastic/kibana-global-experience
packages/shared-ux/card/no_data/types @elastic/kibana-global-experience
packages/shared-ux/file/context @elastic/kibana-global-experience
packages/shared-ux/file/file_picker/impl @elastic/kibana-global-experience
packages/shared-ux/file/file_upload/impl @elastic/kibana-global-experience
packages/shared-ux/file/image/impl @elastic/kibana-global-experience
packages/shared-ux/file/image/mocks @elastic/kibana-global-experience
packages/shared-ux/file/image/types @elastic/kibana-global-experience
packages/shared-ux/file/mocks @elastic/kibana-global-experience
packages/shared-ux/file/types @elastic/kibana-global-experience
packages/shared-ux/file/util @elastic/kibana-global-experience
packages/shared-ux/link/redirect_app/impl @elastic/kibana-global-experience
packages/shared-ux/link/redirect_app/mocks @elastic/kibana-global-experience
Expand All @@ -1057,6 +1057,7 @@ packages/shared-ux/page/solution_nav @elastic/kibana-global-experience
packages/shared-ux/prompt/no_data_views/impl @elastic/kibana-global-experience
packages/shared-ux/prompt/no_data_views/mocks @elastic/kibana-global-experience
packages/shared-ux/prompt/no_data_views/types @elastic/kibana-global-experience
packages/shared-ux/prompt/not_found @elastic/kibana-global-experience
packages/shared-ux/router/impl @elastic/kibana-global-experience
packages/shared-ux/router/mocks @elastic/kibana-global-experience
packages/shared-ux/router/types @elastic/kibana-global-experience
Expand Down
2 changes: 1 addition & 1 deletion api_docs/actions.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,7 @@
},
"<",
"ActionTypeConfig",
">[]>; getOAuthAccessToken: ({ type, options }: Readonly<{} & { options: Readonly<{} & { config: Readonly<{} & { clientId: string; jwtKeyId: string; userIdentifierValue: string; }>; tokenUrl: string; secrets: Readonly<{ privateKeyPassword?: string | undefined; } & { clientSecret: string; privateKey: string; }>; }> | Readonly<{} & { scope: string; config: Readonly<{} & { clientId: string; tenantId: string; }>; tokenUrl: string; secrets: Readonly<{} & { clientSecret: string; }>; }>; type: \"client\" | \"jwt\"; }>, configurationUtilities: ",
">[]>; getOAuthAccessToken: ({ type, options }: Readonly<{} & { options: Readonly<{} & { config: Readonly<{} & { clientId: string; jwtKeyId: string; userIdentifierValue: string; }>; tokenUrl: string; secrets: Readonly<{ privateKeyPassword?: string | undefined; } & { clientSecret: string; privateKey: string; }>; }> | Readonly<{} & { scope: string; config: Readonly<{} & { clientId: string; tenantId: string; }>; tokenUrl: string; secrets: Readonly<{} & { clientSecret: string; }>; }>; type: \"jwt\" | \"client\"; }>, configurationUtilities: ",
"ActionsConfigurationUtilities",
") => Promise<{ accessToken: string | null; }>; enqueueExecution: (options: ",
"ExecuteOptions",
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: 2022-11-28
date: 2022-12-02
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: 2022-11-28
date: 2022-12-02
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: 2022-11-28
date: 2022-12-02
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
Loading

0 comments on commit 0247257

Please sign in to comment.