mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[8.13] chore(NA): rename journeys folder into journeys_e2e inside x-pack/performance to correctly classify journey e2e files (#178340) (#178778)
# Backport This will backport the following commits from `main` to `8.13`: - [chore(NA): rename journeys folder into journeys_e2e inside x-pack/performance to correctly classify journey e2e files (#178340)](https://github.com/elastic/kibana/pull/178340) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Tiago Costa","email":"tiago.costa@elastic.co"},"sourceCommit":{"committedDate":"2024-03-14T21:15:57Z","message":"chore(NA): rename journeys folder into journeys_e2e inside x-pack/performance to correctly classify journey e2e files (#178340)\n\nThe source code classifier we currently have was incorrectly classifying\r\ne2e journey files as `non-package` instead of `tests or mocks` as it was\r\nnot using the name standards we used for FTR files.\r\n\r\nWe could have created a `functional-tests` package for the performance\r\nfolder (which is what we want to do in the future) but because we don't\r\nhave the feature to create ownerless packages it would not be easy to\r\nfind a given owner for that folder.\r\n\r\nAs such I'm just opting for a second solution which is applying the same\r\nname standards to this journeys folder as we have for FTR and changing a\r\nlittle the classifier to recognise it.\r\n\r\nThis should fix the problem found at\r\nhttps://github.com/elastic/kibana/pull/178017.\r\n\r\nCo-authored-by: Alex Szabo <alex.szabo@elastic.co>","sha":"3a040a170a408377c34a897d784aa30378be490d","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","auto-backport","v8.14.0","v8.13.1"],"number":178340,"url":"https://github.com/elastic/kibana/pull/178340","mergeCommit":{"message":"chore(NA): rename journeys folder into journeys_e2e inside x-pack/performance to correctly classify journey e2e files (#178340)\n\nThe source code classifier we currently have was incorrectly classifying\r\ne2e journey files as `non-package` instead of `tests or mocks` as it was\r\nnot using the name standards we used for FTR files.\r\n\r\nWe could have created a `functional-tests` package for the performance\r\nfolder (which is what we want to do in the future) but because we don't\r\nhave the feature to create ownerless packages it would not be easy to\r\nfind a given owner for that folder.\r\n\r\nAs such I'm just opting for a second solution which is applying the same\r\nname standards to this journeys folder as we have for FTR and changing a\r\nlittle the classifier to recognise it.\r\n\r\nThis should fix the problem found at\r\nhttps://github.com/elastic/kibana/pull/178017.\r\n\r\nCo-authored-by: Alex Szabo <alex.szabo@elastic.co>","sha":"3a040a170a408377c34a897d784aa30378be490d"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"main","label":"v8.14.0","labelRegex":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/178340","number":178340,"mergeCommit":{"message":"chore(NA): rename journeys folder into journeys_e2e inside x-pack/performance to correctly classify journey e2e files (#178340)\n\nThe source code classifier we currently have was incorrectly classifying\r\ne2e journey files as `non-package` instead of `tests or mocks` as it was\r\nnot using the name standards we used for FTR files.\r\n\r\nWe could have created a `functional-tests` package for the performance\r\nfolder (which is what we want to do in the future) but because we don't\r\nhave the feature to create ownerless packages it would not be easy to\r\nfind a given owner for that folder.\r\n\r\nAs such I'm just opting for a second solution which is applying the same\r\nname standards to this journeys folder as we have for FTR and changing a\r\nlittle the classifier to recognise it.\r\n\r\nThis should fix the problem found at\r\nhttps://github.com/elastic/kibana/pull/178017.\r\n\r\nCo-authored-by: Alex Szabo <alex.szabo@elastic.co>","sha":"3a040a170a408377c34a897d784aa30378be490d"}},{"branch":"8.13","label":"v8.13.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
This commit is contained in:
parent
24b56c2013
commit
80b8708a84
28 changed files with 32 additions and 31 deletions
|
@ -482,24 +482,24 @@ 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/ecommerce_dashboard_map_only.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/many_fields_lens_editor.ts
|
||||
- x-pack/performance/journeys/many_fields_transform.ts
|
||||
- x-pack/performance/journeys/tsdb_logs_data_visualizer.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/performance/journeys/ecommerce_dashboard_saved_search_only.ts
|
||||
- x-pack/performance/journeys/ecommerce_dashboard_tsvb_gauge_only.ts
|
||||
- x-pack/performance/journeys/dashboard_listing_page.ts
|
||||
- x-pack/performance/journeys/tags_listing_page.ts
|
||||
- x-pack/performance/journeys/cloud_security_dashboard.ts
|
||||
- x-pack/performance/journeys/apm_service_inventory.ts
|
||||
- x-pack/performance/journeys/infra_hosts_view.ts
|
||||
- x-pack/performance/journeys_e2e/ecommerce_dashboard.ts
|
||||
- x-pack/performance/journeys_e2e/ecommerce_dashboard_map_only.ts
|
||||
- x-pack/performance/journeys_e2e/flight_dashboard.ts
|
||||
- x-pack/performance/journeys_e2e/login.ts
|
||||
- x-pack/performance/journeys_e2e/many_fields_discover.ts
|
||||
- x-pack/performance/journeys_e2e/many_fields_lens_editor.ts
|
||||
- x-pack/performance/journeys_e2e/many_fields_transform.ts
|
||||
- x-pack/performance/journeys_e2e/tsdb_logs_data_visualizer.ts
|
||||
- x-pack/performance/journeys_e2e/promotion_tracking_dashboard.ts
|
||||
- x-pack/performance/journeys_e2e/web_logs_dashboard.ts
|
||||
- x-pack/performance/journeys_e2e/data_stress_test_lens.ts
|
||||
- x-pack/performance/journeys_e2e/ecommerce_dashboard_saved_search_only.ts
|
||||
- x-pack/performance/journeys_e2e/ecommerce_dashboard_tsvb_gauge_only.ts
|
||||
- x-pack/performance/journeys_e2e/dashboard_listing_page.ts
|
||||
- x-pack/performance/journeys_e2e/tags_listing_page.ts
|
||||
- x-pack/performance/journeys_e2e/cloud_security_dashboard.ts
|
||||
- x-pack/performance/journeys_e2e/apm_service_inventory.ts
|
||||
- x-pack/performance/journeys_e2e/infra_hosts_view.ts
|
||||
- x-pack/test/custom_branding/config.ts
|
||||
- x-pack/test/profiling_api_integration/cloud/config.ts
|
||||
- x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/actions/trial_license_complete_tier/configs/ess.config.ts
|
||||
|
@ -536,4 +536,4 @@ enabled:
|
|||
- x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/configs/ess.config.ts
|
||||
- x-pack/test/security_solution_api_integration/test_suites/genai/invoke_ai/trial_license_complete_tier/configs/ess.config.ts
|
||||
- x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/exception_lists_items/trial_license_complete_tier/configs/ess.config.ts
|
||||
- x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/lists_items/trial_license_complete_tier/configs/ess.config.ts
|
||||
- x-pack/test/security_solution_api_integration/test_suites/lists_and_exception_lists/lists_items/trial_license_complete_tier/configs/ess.config.ts
|
|
@ -15,7 +15,7 @@ OUTPUT_DIR="${KIBANA_DIR}/${OUTPUT_REL}"
|
|||
.buildkite/scripts/bootstrap.sh
|
||||
|
||||
echo "--- Extract APM metrics"
|
||||
for journey in x-pack/performance/journeys/*; do
|
||||
for journey in x-pack/performance/journeys_e2e/*; do
|
||||
echo "Looking for journey=${journey} and BUILD_ID=${BUILD_ID} in APM traces"
|
||||
|
||||
node scripts/extract_performance_testing_dataset \
|
||||
|
|
|
@ -184,7 +184,7 @@
|
|||
"tags": [],
|
||||
"label": "Constructor",
|
||||
"description": [
|
||||
"\nCreate a Journey which should be exported from a file in the\nx-pack/performance/journeys directory."
|
||||
"\nCreate a Journey which should be exported from a file in the\nx-pack/performance/journeys_e2e directory."
|
||||
],
|
||||
"signature": [
|
||||
"any"
|
||||
|
@ -1409,4 +1409,4 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ Let's assume we instrumented dashboard with load time metrics and want to track
|
|||
Journey supports loading test data with esArchiver or kbnArchiver. Similar to functional tests, it might require to implement custom wait
|
||||
for UI rendering to be completed.
|
||||
|
||||
Simply create a new file in `x-pack/performance/journeys` with the following code:
|
||||
Simply create a new file in `x-pack/performance/journeys_e2e` with the following code:
|
||||
|
||||
```
|
||||
export const journey = new Journey({
|
||||
|
@ -51,7 +51,7 @@ In oder to get correct and consistent metrics, it is important to design journey
|
|||
|
||||
### Running performance journey locally for troubleshooting purposes
|
||||
Use the Node script:
|
||||
`node scripts/run_performance.js --journey-path x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts`
|
||||
`node scripts/run_performance.js --journey-path x-pack/performance/journeys_e2e/$YOUR_JOURNEY_NAME.ts`
|
||||
|
||||
Scripts steps include:
|
||||
- start Elasticsearch
|
||||
|
|
|
@ -108,7 +108,7 @@ export TEST_CLOUD=1
|
|||
Run your journey with the command:
|
||||
|
||||
```
|
||||
node scripts/functional_test_runner.js --config x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts`
|
||||
node scripts/functional_test_runner.js --config x-pack/performance/journeys_e2e/$YOUR_JOURNEY_NAME.ts`
|
||||
```
|
||||
|
||||
APM & Telemetry labels will be updated on the fly and metrics/traces should be available in Telemetry Staging and kibana-ops-e2e-perf cluster.
|
||||
|
|
|
@ -88,7 +88,7 @@ export class Journey<CtxExt extends object> {
|
|||
|
||||
/**
|
||||
* Create a Journey which should be exported from a file in the
|
||||
* x-pack/performance/journeys directory.
|
||||
* x-pack/performance/journeys_e2e directory.
|
||||
*/
|
||||
constructor(opts?: JourneyConfigOptions<CtxExt>) {
|
||||
const path = callsites().at(1)?.getFileName();
|
||||
|
|
|
@ -53,6 +53,7 @@ export const TEST_DIR = new Set([
|
|||
'stub',
|
||||
'e2e',
|
||||
'ftr_e2e',
|
||||
'journeys_e2e',
|
||||
'storybook',
|
||||
'.storybook',
|
||||
'integration_tests',
|
||||
|
|
|
@ -14,7 +14,7 @@ import { ToolingLog } from '@kbn/tooling-log';
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
const JOURNEY_BASE_PATH = 'x-pack/performance/journeys';
|
||||
const JOURNEY_BASE_PATH = 'x-pack/performance/journeys_e2e';
|
||||
|
||||
export interface Journey {
|
||||
name: string;
|
||||
|
@ -126,7 +126,7 @@ run(
|
|||
if (journeyPath && fs.statSync(journeyPath).isFile()) {
|
||||
journeys.push({ name: path.parse(journeyPath).name, path: journeyPath });
|
||||
} else {
|
||||
// default dir is x-pack/performance/journeys
|
||||
// default dir is x-pack/performance/journeys_e2e
|
||||
const dir = journeyPath ?? path.resolve(REPO_ROOT, JOURNEY_BASE_PATH);
|
||||
readFilesRecursively(dir, (filePath: string) =>
|
||||
journeys.push({
|
||||
|
|
|
@ -236,8 +236,8 @@ Run all tests from the `x-pack` root directory
|
|||
- Run `node scripts/functional_tests_server`
|
||||
- Run `node ../scripts/functional_test_runner.js --config ./test/api_integration/config.ts --grep=Lens`
|
||||
- Performance journeys:
|
||||
- Run `node scripts/functional_tests_server.js --config x-pack/test/performance/journeys/data_stress_test_lens/config.ts`
|
||||
- Run `node scripts/functional_test_runner --config x-pack/test/performance/journeys/data_stress_test_lens/config.ts`
|
||||
- Run `node scripts/functional_tests_server.js --config x-pack/test/performance/journeys_e2e/data_stress_test_lens/config.ts`
|
||||
- Run `node scripts/functional_test_runner --config x-pack/test/performance/journeys_e2e/data_stress_test_lens/config.ts`
|
||||
|
||||
## Developing tips
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
}
|
||||
|
||||
const journey: ScalabilityJourney = JSON.parse(fs.readFileSync(scalabilityJsonPath, 'utf8'));
|
||||
const configPath = journey.configPath ?? 'x-pack/performance/journeys/login.ts';
|
||||
const configPath = journey.configPath ?? 'x-pack/performance/journeys_e2e/login.ts';
|
||||
|
||||
const baseConfig = (await readConfigFile(path.resolve(REPO_ROOT, configPath))).getAll();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue