Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c62e172
[ftr] add first-class support for playwrite journeys
Sep 16, 2022
719b070
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Sep 17, 2022
a207faa
fix jest test
Sep 17, 2022
ac0b085
Merge branch 'main' of github.com:elastic/kibana into implement/ftr-j…
Sep 17, 2022
5329f96
Merge branch 'implement/ftr-journey-loading' of github.com:spalger/ki…
Sep 17, 2022
8f409ab
Merge branch 'main' into implement/ftr-journey-loading
Sep 18, 2022
a374605
Merge branch 'main' into implement/ftr-journey-loading
Sep 19, 2022
5d7dcf2
remove ability to customize kibana server args, if we need it we can …
Sep 19, 2022
797dbf9
Merge branch 'main' of github.com:elastic/kibana into implement/ftr-j…
Sep 19, 2022
34d0269
Merge branch 'implement/ftr-journey-loading' of github.com:spalger/ki…
Sep 19, 2022
ef819fb
Merge branch 'main' of github.com:elastic/kibana into implement/ftr-j…
Sep 21, 2022
7bec7d8
remove dev dir that doesn't exist
Sep 21, 2022
59ac929
fix typo
Sep 21, 2022
bc0f318
prevent duplicated array converstion logic by sharing flag reader
Sep 21, 2022
4bc0056
Merge branch 'main' of github.com:elastic/kibana into implement/ftr-j…
Sep 21, 2022
bf20987
remove destructuring of option
Sep 21, 2022
f582cf8
fix scalability config and config_path import
Sep 21, 2022
dbd8136
fix start_servers args and tests
Sep 21, 2022
f8f4d2f
Merge branch 'main' of github.com:elastic/kibana into implement/ftr-j…
Sep 21, 2022
b5ae65c
include simple readme
Sep 21, 2022
a171fc6
fix jest tests and support build re-use when changes are just to jest…
Sep 21, 2022
83b396e
Merge branch 'main' into implement/ftr-journey-loading
Sep 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ disabled:
- x-pack/test/fleet_packages/config.ts

# Scalability testing config that we run in its own pipeline
- x-pack/test/performance/scalability/config.ts
- x-pack/test/scalability/config.ts

defaultQueue: 'n2-4-spot'
enabled:
Expand Down Expand Up @@ -267,10 +267,10 @@ enabled:
- x-pack/test/ui_capabilities/spaces_only/config.ts
- x-pack/test/upgrade_assistant_integration/config.js
- x-pack/test/usage_collection/config.ts
- x-pack/test/performance/journeys/ecommerce_dashboard/config.ts
- x-pack/test/performance/journeys/flight_dashboard/config.ts
- x-pack/test/performance/journeys/login/config.ts
- x-pack/test/performance/journeys/many_fields_discover/config.ts
- x-pack/test/performance/journeys/promotion_tracking_dashboard/config.ts
- x-pack/test/performance/journeys/web_logs_dashboard/config.ts
- x-pack/test/performance/journeys/data_stress_test_lens/config.ts
- x-pack/performance/journeys/ecommerce_dashboard.ts
- x-pack/performance/journeys/flight_dashboard.ts
- x-pack/performance/journeys/login.ts
- x-pack/performance/journeys/many_fields_discover.ts
- x-pack/performance/journeys/promotion_tracking_dashboard.ts
- x-pack/performance/journeys/web_logs_dashboard.ts
- x-pack/performance/journeys/data_stress_test_lens.ts
12 changes: 6 additions & 6 deletions .buildkite/pipelines/performance/daily.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
steps:
- label: ':male-mechanic::skin-tone-2: Pre-Build'
- label: '👨‍🔧 Pre-Build'
command: .buildkite/scripts/lifecycle/pre_build.sh
agents:
queue: kibana-default

- wait

- label: ':factory_worker: Build Kibana Distribution and Plugins'
- label: '🧑‍🏭 Build Kibana Distribution and Plugins'
command: .buildkite/scripts/steps/build_kibana.sh
agents:
queue: c2-16
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"

- label: ':muscle: Performance Tests with Playwright config'
- label: '💪 Performance Tests with Playwright config'
command: .buildkite/scripts/steps/functional/performance_playwright.sh
agents:
queue: kb-static-ubuntu
depends_on: build
key: tests
timeout_in_minutes: 60

- label: ':shipit: Performance Tests dataset extraction for scalability benchmarking'
- label: '🚢 Performance Tests dataset extraction for scalability benchmarking'
command: .buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
agents:
queue: n2-2
depends_on: tests

- label: ':chart_with_upwards_trend: Report performance metrics to ci-stats'
- label: '📈 Report performance metrics to ci-stats'
command: .buildkite/scripts/steps/functional/report_performance_metrics.sh
agents:
queue: n2-2
Expand All @@ -36,7 +36,7 @@ steps:
- wait: ~
continue_on_failure: true

- label: ':male_superhero::skin-tone-2: Post-Build'
- label: '🦸 Post-Build'
command: .buildkite/scripts/lifecycle/post_build.sh
agents:
queue: kibana-default
7 changes: 6 additions & 1 deletion .buildkite/pull_requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@
"kibana_versions_check": true,
"kibana_build_reuse": true,
"kibana_build_reuse_pipeline_slugs": ["kibana-pull-request", "kibana-on-merge"],
"kibana_build_reuse_regexes": ["^test/", "^x-pack/test/"]
"kibana_build_reuse_regexes": [
"^test/",
"^x-pack/test/",
"/__snapshots__/",
"\\.test\\.(ts|tsx|js|jsx)"
]
}
]
}
79 changes: 42 additions & 37 deletions .buildkite/scripts/steps/functional/performance_playwright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,33 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

is_test_execution_step
Comment thread
spalger marked this conversation as resolved.

.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

echo --- Run Performance Tests with Playwright config
echo "--- 🦺 Starting Elasticsearch"

node scripts/es snapshot&
export esPid=$!
trap 'kill ${esPid}' EXIT

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

# 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 continue to run in the background"

# 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
Expand All @@ -29,39 +46,27 @@ unset ELASTIC_APM_SERVER_URL
unset ELASTIC_APM_SECRET_TOKEN
unset ELASTIC_APM_GLOBAL_LABELS


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

# Pings the es server every seconds 2 mins until it is status is green
curl --retry 120 \
--retry-delay 1 \
--retry-all-errors \
-I -XGET "${TEST_ES_URL}/_cluster/health?wait_for_nodes=>=1&wait_for_status=yellow"

journeys=("login" "ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard" "many_fields_discover" "data_stress_test_lens")

for i in "${journeys[@]}"; do
echo "JOURNEY[${i}] is running"

export TEST_PERFORMANCE_PHASE=WARMUP
export JOURNEY_NAME="${i}"

checks-reporter-with-killswitch "Run Performance Tests with Playwright Config (Journey:${i},Phase: WARMUP)" \
node scripts/functional_tests \
--config "x-pack/test/performance/journeys/${i}/config.ts" \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--debug \
--bail

export TEST_PERFORMANCE_PHASE=TEST

checks-reporter-with-killswitch "Run Performance Tests with Playwright Config (Journey:${i},Phase: TEST)" \
node scripts/functional_tests \
--config "x-pack/test/performance/journeys/${i}/config.ts" \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--debug \
--bail
for journey in x-pack/performance/journeys/*; do
set +e

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

export TEST_PERFORMANCE_PHASE="$phase"
node scripts/functional_tests \
--config "$journey" \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--debug \
--bail

status=$?
Comment thread
spalger marked this conversation as resolved.
if [ $status -ne 0 ]; then
echo "^^^ +++"
echo "❌ FTR failed with status code: $status"
exit 1
fi
done

set -e
done

kill "$esPid"
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,16 @@ OUTPUT_DIR="${KIBANA_DIR}/${OUTPUT_REL}"
.buildkite/scripts/bootstrap.sh

echo "--- Extract APM metrics"
scalabilityJourneys=("login" "ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard" "many_fields_discover")

for i in "${scalabilityJourneys[@]}"; do
JOURNEY_NAME="${i}"
echo "Looking for JOURNEY=${JOURNEY_NAME} and BUILD_ID=${BUILD_ID} in APM traces"

node scripts/extract_performance_testing_dataset \
--config "x-pack/test/performance/journeys/${i}/config.ts" \
--buildId "${BUILD_ID}" \
--es-url "${ES_SERVER_URL}" \
--es-username "${USER_FROM_VAULT}" \
--es-password "${PASS_FROM_VAULT}" \
--without-static-resources
for journey in x-pack/performance/journeys/*; do
echo "Looking for journey=${journey} and BUILD_ID=${BUILD_ID} in APM traces"

node scripts/extract_performance_testing_dataset \
--config "${journey}" \
--buildId "${BUILD_ID}" \
--es-url "${ES_SERVER_URL}" \
--es-username "${USER_FROM_VAULT}" \
--es-password "${PASS_FROM_VAULT}" \
--without-static-resources
done

echo "--- Creating scalability dataset in ${OUTPUT_REL}"
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const DEV_PATTERNS = [
'x-pack/{dev-tools,tasks,scripts,test,build_chromium}/**/*',
'x-pack/plugins/*/server/scripts/**/*',
'x-pack/plugins/fleet/cypress',
'x-pack/performance/**/*',
];

/** Restricted imports with suggested alternatives */
Expand Down
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -860,9 +860,12 @@ packages/kbn-eslint-plugin-disable @elastic/kibana-operations
packages/kbn-eslint-plugin-eslint @elastic/kibana-operations
packages/kbn-eslint-plugin-imports @elastic/kibana-operations
packages/kbn-expect @elastic/kibana-operations
packages/kbn-failed-test-reporter-cli @elastic/kibana-operations
packages/kbn-field-types @elastic/kibana-app-services
packages/kbn-find-used-node-modules @elastic/kibana-operations
packages/kbn-flot-charts @elastic/kibana-operations
packages/kbn-ftr-common-functional-services @elastic/kibana-operations
packages/kbn-ftr-screenshot-filename @elastic/kibana-operations
packages/kbn-generate @elastic/kibana-operations
packages/kbn-get-repo-files @elastic/kibana-operations
packages/kbn-handlebars @elastic/kibana-security
Expand All @@ -873,6 +876,7 @@ packages/kbn-import-resolver @elastic/kibana-operations
packages/kbn-interpreter @elastic/kibana-app-services
packages/kbn-io-ts-utils @elastic/apm-ui
packages/kbn-jest-serializers @elastic/kibana-operations
packages/kbn-journeys @elastic/kibana-operations
packages/kbn-kibana-manifest-schema @elastic/kibana-operations
packages/kbn-logging @elastic/kibana-core
packages/kbn-logging-mocks @elastic/kibana-core
Expand Down
1 change: 1 addition & 0 deletions dev_docs/operations/operations_landing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ layout: landing
{ pageId: "kibDevDocsOpsWritingStableFunctionalTests" },
{ pageId: "kibDevDocsOpsFlakyTestRunner" },
{ pageId: "kibDevDocsOpsCiStats" },
{ pageId: "kibDevDocsOpsJourneys" },
]}
/>

Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,15 @@
"@kbn/eslint-plugin-eslint": "link:bazel-bin/packages/kbn-eslint-plugin-eslint",
"@kbn/eslint-plugin-imports": "link:bazel-bin/packages/kbn-eslint-plugin-imports",
"@kbn/expect": "link:bazel-bin/packages/kbn-expect",
"@kbn/failed-test-reporter-cli": "link:bazel-bin/packages/kbn-failed-test-reporter-cli",
"@kbn/find-used-node-modules": "link:bazel-bin/packages/kbn-find-used-node-modules",
"@kbn/ftr-common-functional-services": "link:bazel-bin/packages/kbn-ftr-common-functional-services",
"@kbn/ftr-screenshot-filename": "link:bazel-bin/packages/kbn-ftr-screenshot-filename",
"@kbn/generate": "link:bazel-bin/packages/kbn-generate",
"@kbn/get-repo-files": "link:bazel-bin/packages/kbn-get-repo-files",
"@kbn/import-resolver": "link:bazel-bin/packages/kbn-import-resolver",
"@kbn/jest-serializers": "link:bazel-bin/packages/kbn-jest-serializers",
"@kbn/journeys": "link:bazel-bin/packages/kbn-journeys",
"@kbn/kibana-manifest-schema": "link:bazel-bin/packages/kbn-kibana-manifest-schema",
"@kbn/managed-vscode-config": "link:bazel-bin/packages/kbn-managed-vscode-config",
"@kbn/managed-vscode-config-cli": "link:bazel-bin/packages/kbn-managed-vscode-config-cli",
Expand Down Expand Up @@ -1017,8 +1021,11 @@
"@types/kbn__es-types": "link:bazel-bin/packages/kbn-es-types/npm_module_types",
"@types/kbn__eslint-plugin-disable": "link:bazel-bin/packages/kbn-eslint-plugin-disable/npm_module_types",
"@types/kbn__eslint-plugin-imports": "link:bazel-bin/packages/kbn-eslint-plugin-imports/npm_module_types",
"@types/kbn__failed-test-reporter-cli": "link:bazel-bin/packages/kbn-failed-test-reporter-cli/npm_module_types",
"@types/kbn__field-types": "link:bazel-bin/packages/kbn-field-types/npm_module_types",
"@types/kbn__find-used-node-modules": "link:bazel-bin/packages/kbn-find-used-node-modules/npm_module_types",
"@types/kbn__ftr-common-functional-services": "link:bazel-bin/packages/kbn-ftr-common-functional-services/npm_module_types",
"@types/kbn__ftr-screenshot-filename": "link:bazel-bin/packages/kbn-ftr-screenshot-filename/npm_module_types",
"@types/kbn__generate": "link:bazel-bin/packages/kbn-generate/npm_module_types",
"@types/kbn__get-repo-files": "link:bazel-bin/packages/kbn-get-repo-files/npm_module_types",
"@types/kbn__handlebars": "link:bazel-bin/packages/kbn-handlebars/npm_module_types",
Expand All @@ -1032,6 +1039,7 @@
"@types/kbn__interpreter": "link:bazel-bin/packages/kbn-interpreter/npm_module_types",
"@types/kbn__io-ts-utils": "link:bazel-bin/packages/kbn-io-ts-utils/npm_module_types",
"@types/kbn__jest-serializers": "link:bazel-bin/packages/kbn-jest-serializers/npm_module_types",
"@types/kbn__journeys": "link:bazel-bin/packages/kbn-journeys/npm_module_types",
"@types/kbn__kbn-ci-stats-performance-metrics": "link:bazel-bin/packages/kbn-kbn-ci-stats-performance-metrics/npm_module_types",
"@types/kbn__kibana-manifest-schema": "link:bazel-bin/packages/kbn-kibana-manifest-schema/npm_module_types",
"@types/kbn__logging": "link:bazel-bin/packages/kbn-logging/npm_module_types",
Expand Down
8 changes: 8 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,12 @@ filegroup(
"//packages/kbn-eslint-plugin-eslint:build",
"//packages/kbn-eslint-plugin-imports:build",
"//packages/kbn-expect:build",
"//packages/kbn-failed-test-reporter-cli:build",
"//packages/kbn-field-types:build",
"//packages/kbn-find-used-node-modules:build",
"//packages/kbn-flot-charts:build",
"//packages/kbn-ftr-common-functional-services:build",
"//packages/kbn-ftr-screenshot-filename:build",
"//packages/kbn-generate:build",
"//packages/kbn-get-repo-files:build",
"//packages/kbn-handlebars:build",
Expand All @@ -217,6 +220,7 @@ filegroup(
"//packages/kbn-interpreter:build",
"//packages/kbn-io-ts-utils:build",
"//packages/kbn-jest-serializers:build",
"//packages/kbn-journeys:build",
"//packages/kbn-kibana-manifest-schema:build",
"//packages/kbn-logging:build",
"//packages/kbn-logging-mocks:build",
Expand Down Expand Up @@ -514,8 +518,11 @@ filegroup(
"//packages/kbn-es-types:build_types",
"//packages/kbn-eslint-plugin-disable:build_types",
"//packages/kbn-eslint-plugin-imports:build_types",
"//packages/kbn-failed-test-reporter-cli:build_types",
"//packages/kbn-field-types:build_types",
"//packages/kbn-find-used-node-modules:build_types",
"//packages/kbn-ftr-common-functional-services:build_types",
"//packages/kbn-ftr-screenshot-filename:build_types",
"//packages/kbn-generate:build_types",
"//packages/kbn-get-repo-files:build_types",
"//packages/kbn-handlebars:build_types",
Expand All @@ -526,6 +533,7 @@ filegroup(
"//packages/kbn-interpreter:build_types",
"//packages/kbn-io-ts-utils:build_types",
"//packages/kbn-jest-serializers:build_types",
"//packages/kbn-journeys:build_types",
"//packages/kbn-kibana-manifest-schema:build_types",
"//packages/kbn-logging:build_types",
"//packages/kbn-logging-mocks:build_types",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-dev-cli-runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
export * from './src/run';
export * from './src/run_with_commands';
export * from './src/flags';
export * from './src/flags_reader';
export type { CleanupTask } from './src/cleanup';
6 changes: 5 additions & 1 deletion packages/kbn-dev-cli-runner/src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export function mergeFlagOptions(global: FlagOptions = {}, local: FlagOptions =
};
}

export const DEFAULT_FLAG_ALIASES = {
v: 'verbose',
};

export function getFlags(
argv: string[],
flagOptions: RunOptions['flags'] = {},
Expand All @@ -67,7 +71,7 @@ export function getFlags(
boolean: [...(flagOptions.boolean || []), ...logLevelFlags, 'help'],
alias: {
...flagOptions.alias,
v: 'verbose',
...DEFAULT_FLAG_ALIASES,
},
default: flagOptions.default,
unknown: (name: string) => {
Expand Down
Loading