Skip to content

Commit

Permalink
Revert "[ftr] add first-class support for playwrite journeys (#140680)"
Browse files Browse the repository at this point in the history
This reverts commit 50b3b57.
  • Loading branch information
spalger committed Sep 28, 2022
1 parent f8bf65c commit d11c9a7
Show file tree
Hide file tree
Showing 197 changed files with 4,096 additions and 4,828 deletions.
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/scalability/config.ts
- x-pack/test/performance/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/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
- 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
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: '👨‍🔧 Pre-Build'
- label: ':male-mechanic::skin-tone-2: Pre-Build'
command: .buildkite/scripts/lifecycle/pre_build.sh
agents:
queue: kibana-default

- wait

- label: '🧑‍🏭 Build Kibana Distribution and Plugins'
- label: ':factory_worker: 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: '💪 Performance Tests with Playwright config'
- label: ':muscle: 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: '🚢 Performance Tests dataset extraction for scalability benchmarking'
- label: ':shipit: Performance Tests dataset extraction for scalability benchmarking'
command: .buildkite/scripts/steps/functional/scalability_dataset_extraction.sh
agents:
queue: n2-2
depends_on: tests

- label: '📈 Report performance metrics to ci-stats'
- label: ':chart_with_upwards_trend: 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: '🦸 Post-Build'
- label: ':male_superhero::skin-tone-2: Post-Build'
command: .buildkite/scripts/lifecycle/post_build.sh
agents:
queue: kibana-default
7 changes: 1 addition & 6 deletions .buildkite/pull_requests.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@
"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/",
"/__snapshots__/",
"\\.test\\.(ts|tsx|js|jsx)"
]
"kibana_build_reuse_regexes": ["^test/", "^x-pack/test/"]
}
]
}
79 changes: 37 additions & 42 deletions .buildkite/scripts/steps/functional/performance_playwright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,16 @@ set -euo pipefail

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

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

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

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"
esPid=$!

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

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=$?
if [ $status -ne 0 ]; then
echo "^^^ +++"
echo "❌ FTR failed with status code: $status"
exit 1
fi
done

set -e

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
done

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

echo "--- Extract APM metrics"
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
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
done

echo "--- Creating scalability dataset in ${OUTPUT_REL}"
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ 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: 0 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -877,12 +877,9 @@ 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 @@ -893,7 +890,6 @@ 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: 0 additions & 1 deletion dev_docs/operations/operations_landing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ layout: landing
{ pageId: "kibDevDocsOpsWritingStableFunctionalTests" },
{ pageId: "kibDevDocsOpsFlakyTestRunner" },
{ pageId: "kibDevDocsOpsCiStats" },
{ pageId: "kibDevDocsOpsJourneys" },
]}
/>

Expand Down
8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -715,15 +715,11 @@
"@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 @@ -1044,11 +1040,8 @@
"@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 @@ -1062,7 +1055,6 @@
"@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: 0 additions & 8 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,9 @@ 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 @@ -229,7 +226,6 @@ 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 @@ -538,11 +534,8 @@ 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 @@ -553,7 +546,6 @@ 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: 0 additions & 1 deletion packages/kbn-dev-cli-runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
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: 1 addition & 5 deletions packages/kbn-dev-cli-runner/src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ export function mergeFlagOptions(global: FlagOptions = {}, local: FlagOptions =
};
}

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

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

0 comments on commit d11c9a7

Please sign in to comment.