Skip to content
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4cb42e7
initial commit
rStelmach Feb 9, 2026
c635655
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Feb 9, 2026
192ce2e
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 9, 2026
c404915
fix tests
rStelmach Feb 9, 2026
04eaa54
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 10, 2026
5fb6e44
fix tests
rStelmach Feb 10, 2026
93ea3ac
adjust the stream ingestion
rStelmach Feb 10, 2026
0b20355
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Feb 10, 2026
aa4a44b
raise max shards
rStelmach Feb 10, 2026
2237656
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 10, 2026
b2bca04
adjust streams creation
rStelmach Feb 11, 2026
683ee05
adjust max shardHeadroom
rStelmach Feb 12, 2026
4da18ab
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 12, 2026
3bd3ab2
adjust max shardHeadroom
rStelmach Feb 12, 2026
1b5e465
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 12, 2026
926a52a
adjust max shardHeadroom
rStelmach Feb 12, 2026
58ff17b
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 16, 2026
0d2dc9d
add wired streams journey
rStelmach Feb 16, 2026
5ee3aac
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Feb 16, 2026
087c18b
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Feb 16, 2026
3d27e89
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 16, 2026
6f51503
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 17, 2026
1582f16
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 23, 2026
65905ca
merge conflicts
rStelmach Feb 23, 2026
87cbae6
increase wired streams number to 1000
rStelmach Feb 24, 2026
a97ef99
adjust building stream children
rStelmach Feb 24, 2026
d864305
fix streams creation
rStelmach Feb 24, 2026
be5b36d
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Feb 24, 2026
eb90d6f
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 24, 2026
14a25ea
update performance journeys to use logs.otel root stream
rStelmach Feb 25, 2026
828b5eb
add retry logic for 409 conflicts during wired hierarchy content import
rStelmach Feb 25, 2026
e644a4b
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 25, 2026
494043a
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Feb 25, 2026
5385f72
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 25, 2026
38aeb1a
fix 400
rStelmach Feb 25, 2026
81e392e
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Feb 27, 2026
026ceb9
fix 409
rStelmach Mar 2, 2026
dc5ba11
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 2, 2026
be144af
cleanup
rStelmach Mar 2, 2026
e23b011
add remaining journey
rStelmach Mar 2, 2026
ac71fd1
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 3, 2026
01e1267
move journey to performance run only
rStelmach Mar 3, 2026
96412a5
scale up journeys and move them to scheduled perf pipeline
rStelmach Mar 5, 2026
4ceb95f
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 5, 2026
3c4d895
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 9, 2026
fa0b385
update code ownership of stream journeys
rStelmach Mar 9, 2026
7e0617b
extend stories
rStelmach Mar 10, 2026
61ac545
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Mar 10, 2026
6f3841f
add function to create new field names
rStelmach Mar 11, 2026
ae815aa
add workoaround around network errors
rStelmach Mar 11, 2026
8cecc00
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 12, 2026
9e0a637
increase deleting batch
rStelmach Mar 12, 2026
fe29aa8
increase deleting batch, address coderabbit comments
rStelmach Mar 12, 2026
fd1a689
create separate pipeline for streams journeys
rStelmach Mar 16, 2026
5e4d806
Changes from ts-node .buildkite/pipeline-resource-definitions/scripts…
kibanamachine Mar 16, 2026
3a43a94
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 17, 2026
3bd349d
increase timeout
rStelmach Mar 18, 2026
6d47382
finish setting up custom pipeline
rStelmach Mar 19, 2026
af717ea
remove hardcoded delay
rStelmach Mar 19, 2026
5f9d0cd
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 19, 2026
b21a7ef
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 19, 2026
599ec21
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 20, 2026
21eecda
dont automatically build on new branches
rStelmach Mar 20, 2026
b3db365
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 23, 2026
cd8fd2e
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 23, 2026
eb8fb62
fix CI
rStelmach Mar 23, 2026
00ac6c1
Changes from node scripts/lint_ts_projects --fix
kibanamachine Mar 23, 2026
442a790
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Mar 23, 2026
340fe70
remove unused code
rStelmach Mar 24, 2026
ba07441
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 25, 2026
16adcf1
Merge branch 'main' into 458-automated-scalability-testing
rStelmach Mar 27, 2026
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
9 changes: 9 additions & 0 deletions .buildkite/ftr_platform_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ disabled:
# Default http2 config to use for performance journeys
- x-pack/performance/configs/http2_config.ts

# Streams performance journeys — run exclusively in the scheduled performance pipeline
- x-pack/performance/journeys_e2e/streams_data_quality.ts
- x-pack/performance/journeys_e2e/streams_field_mapping.ts
- x-pack/performance/journeys_e2e/streams_listing_page.ts
- x-pack/performance/journeys_e2e/streams_processing_step.ts
- x-pack/performance/journeys_e2e/streams_retention.ts
- x-pack/performance/journeys_e2e/streams_wired_hierarchy.ts
- x-pack/performance/configs/streams_heavy_config.ts
Comment on lines +50 to +57

@coderabbitai coderabbitai Bot Mar 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Don’t disable the lightweight Streams journeys here.

This block currently moves all Streams journeys out of the regular stateful CI path, but the PR goal says only streams_wired_hierarchy.ts should be scheduled-pipeline-only. Keeping streams_data_quality.ts, streams_field_mapping.ts, streams_listing_page.ts, streams_processing_step.ts, and streams_retention.ts in disabled will drop the PR-CI coverage you’re adding.

Suggested update
   # Streams performance journeys — run exclusively in the scheduled performance pipeline
-  - x-pack/performance/journeys_e2e/streams_data_quality.ts
-  - x-pack/performance/journeys_e2e/streams_field_mapping.ts
-  - x-pack/performance/journeys_e2e/streams_listing_page.ts
-  - x-pack/performance/journeys_e2e/streams_processing_step.ts
-  - x-pack/performance/journeys_e2e/streams_retention.ts
   - x-pack/performance/journeys_e2e/streams_wired_hierarchy.ts
   - x-pack/performance/configs/streams_heavy_config.ts
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.buildkite/ftr_platform_stateful_configs.yml around lines 50 - 57, The
disabled list mistakenly removes all Streams journeys; revert so only
x-pack/performance/journeys_e2e/streams_wired_hierarchy.ts remains
scheduled-pipeline-only and keep
x-pack/performance/journeys_e2e/streams_data_quality.ts,
x-pack/performance/journeys_e2e/streams_field_mapping.ts,
x-pack/performance/journeys_e2e/streams_listing_page.ts,
x-pack/performance/journeys_e2e/streams_processing_step.ts, and
x-pack/performance/journeys_e2e/streams_retention.ts in the regular stateful CI
path (i.e., remove those filenames from the disabled block and leave only
streams_wired_hierarchy.ts in the scheduled-only list).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can I get some help in understanding - won't this mean we'll always run this config with other ftrs? (cc: @dmlemeshko )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!


# Gen AI suites, running with their own pipeline
- x-pack/platform/test/functional_gen_ai/inference/config.ts
- x-pack/platform/test/agent_builder/smoke_tests/config.stateful.ts
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: bk-kibana-streams-performance
description: Runs Streams performance journeys at scale
links:
- url: 'https://buildkite.com/elastic/kibana-streams-performance'
title: Pipeline link
spec:
type: buildkite-pipeline
owner: 'group:obs-onboarding-team'
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: kibana / streams-performance
description: Runs Streams performance journeys at scale
spec:
env:
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'false'
allow_rebuilds: true
branch_configuration: main
default_branch: main
repository: elastic/kibana
pipeline_file: .buildkite/pipelines/performance/streams_weekly.yml
provider_settings:
trigger_mode: none
build_branches: false
prefix_pull_request_fork_branch_names: true
publish_commit_status: false
skip_pull_request_builds_for_existing_commits: true
teams:
everyone:
access_level: BUILD_AND_READ
obs-onboarding-team:
access_level: MANAGE_BUILD_AND_READ
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
appex-qa:
access_level: MANAGE_BUILD_AND_READ
kibana-tech-leads:
access_level: MANAGE_BUILD_AND_READ
schedules:
Weekly Streams performance:
cronline: 0 6 * * 1 Europe/Berlin
message: Weekly Streams performance
branch: main
tags:
- kibana
- performance
- streams
1 change: 1 addition & 0 deletions .buildkite/pipeline-resource-definitions/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release-testing.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-storybooks-from-pr.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-streams-performance-weekly.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-uiam-cosmos-db-emulator-verify-and-promote.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-uiam-verify-and-promote.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-vm-build-orchestrator.yml
Expand Down
53 changes: 53 additions & 0 deletions .buildkite/pipelines/performance/streams_weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
steps:
- label: ':male-mechanic::skin-tone-2: Pre-Build'
command: .buildkite/scripts/lifecycle/pre_build.sh
agents:
image: family/kibana-ubuntu-2404
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2

- wait

- label: ':building_construction: Build Kibana Distribution'
command: .buildkite/scripts/steps/build_kibana.sh
agents:
image: family/kibana-ubuntu-2404
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-8
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"

- label: ':muscle: Streams Performance Tests'
command: .buildkite/scripts/steps/functional/performance_playwright.sh
env:
JOURNEYS_GROUP: streams
PERFORMANCE_ENABLE_TELEMETRY: true
agents:
queue: kb-static-scalability-2
depends_on: build
key: tests
timeout_in_minutes: 180

- label: ':chart_with_upwards_trend: Report performance metrics to ci-stats'
command: .buildkite/scripts/steps/functional/report_performance_metrics.sh
agents:
image: family/kibana-ubuntu-2404
imageProject: elastic-images-prod
provider: gcp
localSsds: 1
localSsdInterface: nvme
machineType: n2-standard-2
depends_on: tests

- wait: ~
continue_on_failure: true

- label: ':male_superhero::skin-tone-2: Post-Build'
command: .buildkite/scripts/lifecycle/post_build.sh
agents:
image: family/kibana-ubuntu-2404
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,10 @@ x-pack/platform/plugins/shared/streams_app/public/components/data_management/str
/x-pack/platform/test/api_integration_deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts @elastic/obs-sig-events-team @elastic/obs-onboarding-team
/x-pack/platform/test/api_integration/fixtures/kbn_archives/streams @elastic/obs-sig-events-team @elastic/obs-onboarding-team
/x-pack/platform/plugins/shared/streams_app/test/scout/ui/tests @elastic/obs-sig-events-team @elastic/obs-onboarding-team
/x-pack/performance/configs/streams_* @elastic/obs-sig-events-team @elastic/obs-onboarding-team
/x-pack/performance/journeys_e2e/streams_* @elastic/obs-sig-events-team @elastic/obs-onboarding-team
Comment thread
coderabbitai[bot] marked this conversation as resolved.
/.buildkite/pipelines/performance/streams_weekly.yml @elastic/obs-sig-events-team @elastic/obs-onboarding-team
/.buildkite/pipeline-resource-definitions/kibana-streams-performance-weekly.yml @elastic/obs-sig-events-team @elastic/obs-onboarding-team


### END Observability Plugins
Expand Down
8 changes: 8 additions & 0 deletions src/dev/performance/run_performance_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ const journeyTargetGroups: JourneyTargetGroups = {
maps: ['ecommerce_dashboard_map_only'],
ml: ['aiops_log_rate_analysis', 'many_fields_transform', 'tsdb_logs_data_visualizer'],
esql: ['many_fields_discover_esql', 'web_logs_dashboard_esql', 'many_fields_esql_editor'],
streams: [
'streams_listing_page',
'streams_data_quality',
'streams_processing_step',
'streams_retention',
'streams_field_mapping',
'streams_wired_hierarchy',
],
};

const readFilesRecursively = (dir: string, callback: Function) => {
Expand Down
28 changes: 28 additions & 0 deletions x-pack/performance/configs/streams_heavy_config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { FtrConfigProviderContext } from '@kbn/test';

/**
* Extended FTR config for heavy Streams performance journeys (e.g. large wired hierarchy).
* Increases mochaOpts.timeout to 1 hour because beforeSteps runs inside Mocha's before() hook,
* meaning the entire data setup (batched content pack imports for 1000 wired children) is
* subject to this timeout. On CI bare metal workers the setup alone takes ~25-30 minutes.
*
*/
// eslint-disable-next-line import/no-default-export
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
Comment on lines +17 to +18

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Move the default-export lint exception out of the file.

Adding a new eslint-disable here bakes the exception into yet another FTR config. If this file shape really requires a default export, the carve-out should live in the lint configuration for this config pattern instead of being suppressed inline.

As per coding guidelines, "Never suppress linting errors with eslint-disable; fix the root cause."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@x-pack/performance/configs/streams_heavy_config.ts` around lines 14 - 15,
Remove the inline eslint-disable and restore the file to a normal export by
deleting the "// eslint-disable-next-line import/no-default-export" comment that
precedes the "export default async function ({ readConfigFile }:
FtrConfigProviderContext)" declaration; then add a targeted rule override in the
repository ESLint configuration to allow default exports for this FTR config
pattern (match the config file glob) instead of suppressing the rule inline so
the lint carve-out is centralized and not baked into individual config files.

const baseConfig = await readConfigFile(require.resolve('./http2_config'));

return {
...baseConfig.getAll(),
mochaOpts: {
...baseConfig.get('mochaOpts'),
timeout: 3_600_000, // 1 hour
},
};
}
32 changes: 32 additions & 0 deletions x-pack/performance/journeys_e2e/streams_data_quality.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { Journey } from '@kbn/journeys';
import { subj } from '@kbn/test-subj-selector';
import { setupDataQualityAtScale } from '../synthtrace_data/streams_data';

export const journey = new Journey({
ftrConfigPath: 'x-pack/performance/configs/streams_heavy_config.ts',
beforeSteps: async ({ kibanaServer, es, log }) => {
await setupDataQualityAtScale(kibanaServer, es, log);
},
})
.step('Go to stream detail page', async ({ page, kbnUrl }) => {
await page.goto(kbnUrl.get('/app/streams/logs.otel.child1'));
await page.waitForSelector(subj('wiredStreamBadge'), { timeout: 60000 });
})
.step('Navigate to Data Quality tab', async ({ page, kbnUrl }) => {
await page.goto(kbnUrl.get('/app/streams/logs.otel.child1/management/dataQuality'));
await page.waitForSelector(subj('datasetQualityDetailsSummaryKpiCard-Degraded documents'), {
timeout: 60000,
});
})
.step('Verify data quality metrics render', async ({ page }) => {
await page.waitForSelector(subj('datasetQualityDetailsSummaryKpiCard-Failed documents'), {
timeout: 60000,
});
});
73 changes: 73 additions & 0 deletions x-pack/performance/journeys_e2e/streams_field_mapping.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { Journey } from '@kbn/journeys';
import { subj } from '@kbn/test-subj-selector';
import { setupFieldMappingAtScale } from '../synthtrace_data/streams_data';

const getNewFieldName = (): string => {
const phase = (process.env.TEST_PERFORMANCE_PHASE ?? 'local')
.toLowerCase()
.replace(/[^a-z0-9_]+/g, '_');

return `attributes.perf_scale_new_field_${phase}`;
};

export const journey = new Journey({
ftrConfigPath: 'x-pack/performance/configs/streams_heavy_config.ts',
beforeSteps: async ({ kibanaServer, log }) => {
await setupFieldMappingAtScale(kibanaServer, log);
},
})
.step('Go to stream schema page', async ({ page, kbnUrl }) => {
await page.goto(kbnUrl.get('/app/streams/logs.otel.child1/management/schema'));
await page.waitForSelector(subj('streamsAppContentAddFieldButton'), { timeout: 60000 });
})
.step('Open add field flyout', async ({ page }) => {
await page.click(subj('streamsAppContentAddFieldButton'));
await page.waitForSelector(subj('streamsAppSchemaEditorAddFieldFlyoutFieldName'), {
timeout: 30000,
});
})
.step('Configure new field mapping', async ({ page, inputDelays }) => {
const comboBox = page.locator(subj('streamsAppSchemaEditorAddFieldFlyoutFieldName'));
const comboInput = comboBox.locator('input[role="combobox"]');
const fieldName = getNewFieldName();
await comboInput.click();
await comboInput.pressSequentially(fieldName, {
delay: inputDelays.TYPING,
timeout: 60000,
});
await page.keyboard.press('Enter');

await page.click(subj('streamsAppFieldFormTypeSelect'));
await page.click(subj('option-type-keyword'));
})
.step('Add field mapping', async ({ page }) => {
await page.waitForSelector(`${subj('streamsAppSchemaEditorAddFieldButton')}:not([disabled])`, {
timeout: 30000,
});
await page.click(subj('streamsAppSchemaEditorAddFieldButton'));
await page.waitForSelector(subj('streamsAppSchemaEditorAddFieldFlyoutCloseButton'), {
state: 'detached',
timeout: 30000,
});
})
.step('Review and submit field mapping', async ({ page }) => {
await page.waitForSelector(subj('streamsAppSchemaEditorReviewStagedChangesButton'), {
timeout: 60000,
});
await page.click(subj('streamsAppSchemaEditorReviewStagedChangesButton'));
await page.waitForSelector(subj('streamsAppSchemaChangesReviewModalSubmitButton'), {
timeout: 60000,
});
await page.click(subj('streamsAppSchemaChangesReviewModalSubmitButton'));
await page.waitForSelector(subj('streamsAppSchemaChangesReviewModalSubmitButton'), {
state: 'detached',
timeout: 30000,
});
});
84 changes: 84 additions & 0 deletions x-pack/performance/journeys_e2e/streams_listing_page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { Journey } from '@kbn/journeys';
import { subj } from '@kbn/test-subj-selector';
import { setupListingPageData } from '../synthtrace_data/streams_data';

const STREAMS_SEARCH_SELECTOR = 'input[aria-label="Search streams by name"]';
const STREAMS_EXPAND_ALL_BUTTON = subj('streamsExpandAllButton');
const STREAMS_COLLAPSE_ALL_BUTTON = subj('streamsCollapseAllButton');
const CLASSIC_STREAM_TO_SEARCH = 'logs-perf-classic-00001';

export const journey = new Journey({
ftrConfigPath: 'x-pack/performance/configs/streams_heavy_config.ts',
beforeSteps: async ({ kibanaServer, es, log }) => {
await setupListingPageData(kibanaServer, es, log);
},
})
.step('Go to Streams listing page', async ({ page, kbnUrl }) => {
await page.goto(kbnUrl.get('/app/streams'));
await page.waitForSelector(subj('streamsTable'), { timeout: 120000 });
})
.step('Search for a classic stream', async ({ page, inputDelays }) => {
const searchBox = page.locator(STREAMS_SEARCH_SELECTOR).first();
await searchBox.waitFor({ state: 'visible', timeout: 60000 });
await searchBox.fill('');
await searchBox.pressSequentially(CLASSIC_STREAM_TO_SEARCH, {
delay: inputDelays.TYPING,
timeout: 120000,
});
await page.waitForSelector(subj(`streamsNameLink-${CLASSIC_STREAM_TO_SEARCH}`), {
timeout: 120000,
});
})
.step('Clear search and expand all streams', async ({ page }) => {
const searchBox = page.locator(STREAMS_SEARCH_SELECTOR).first();
await searchBox.waitFor({ state: 'visible', timeout: 60000 });
await searchBox.fill('');

const expandAllButton = page.locator(STREAMS_EXPAND_ALL_BUTTON).first();
const collapseAllButton = page.locator(STREAMS_COLLAPSE_ALL_BUTTON).first();

if (await expandAllButton.isVisible().catch(() => false)) {
await expandAllButton.click();
} else {
await collapseAllButton.waitFor({ state: 'visible', timeout: 60000 });
await collapseAllButton.click();
await expandAllButton.waitFor({ state: 'visible', timeout: 60000 });
await expandAllButton.click();
}

// Wait for the expand-all action to settle (button state swap).
await collapseAllButton.waitFor({ state: 'visible', timeout: 60000 });
})
.step('Collapse all streams', async ({ page }) => {
const collapseAllButton = page.locator(STREAMS_COLLAPSE_ALL_BUTTON).first();
await collapseAllButton.waitFor({ state: 'visible', timeout: 60000 });
await collapseAllButton.click();
const expandAllButton = page.locator(STREAMS_EXPAND_ALL_BUTTON).first();
await expandAllButton.waitFor({ state: 'visible', timeout: 60000 });
})
.step('Navigate to a stream detail page', async ({ page, inputDelays }) => {
// logs.otel can be paginated away. Filter to bring it into view.
const searchBox = page.locator(STREAMS_SEARCH_SELECTOR).first();
await searchBox.waitFor({ state: 'visible', timeout: 60000 });
await searchBox.fill('');
await searchBox.pressSequentially('logs.otel', {
delay: inputDelays.TYPING,
timeout: 60000,
});

const logsOtelExpand = page.locator(subj('expandButton-logs.otel'));
await logsOtelExpand.waitFor({ state: 'visible', timeout: 120000 });
await logsOtelExpand.click();

const streamLink = page.locator(subj('streamsNameLink-logs.otel.child1'));
await streamLink.waitFor({ state: 'visible', timeout: 60000 });
await streamLink.click();
await page.waitForSelector(subj('wiredStreamBadge'), { timeout: 60000 });
});
Loading
Loading