Skip to content

Conversation

@dolaru
Copy link
Member

@dolaru dolaru commented Dec 3, 2025

Because Scout is based on Playwright, detailed information about tests is only available while Playwright is running. This means that any time we need test-level information from a test config file we have to start a Playwright process which can be quite slow and resource-intensive if you want to do this for a larger number of test configs.

These changes are trying to address that by introducing a system where this runtime-only information is stored in manifest files, in close proximity of test config files, automatically kept up to date by CI.

Usage

Locally, run the new kbn-scout CLI command (via node scripts/scout update-test-config-manifests) to regenerate manifests.

  • Running without --includingUpToDate will only regenerate manifests that appear outdated (component directory SHA mismatch)
  • Use --includingUpToDate to force regenerate all manifests

In Buildkite, node scripts/scout update-test-config-manifests runs as a quick check and any changes will be auto-commited.

Notable changes

  • Add Scout reporting package with a registry of test configs and components
  • Add a Playwright reporter that writes manifest files that capture test information for static analysis
  • Add a Scout CLI command update-test-config-manifests to create/update manifests
  • Add a versatile Playwright CLI wrapper for Scout tooling to call Playwright programmatically
  • Add Buildkite quick check to run manifest updates and commit any changes as [Scout] Automated config manifest updates
  • Add new path constants/globs/regex for discovering Scout configs
  • Changed how test IDs are calculated for Scout: combine test file path and test title when hashing
  • Remove project name and test file path from Scout test titles

@dolaru dolaru self-assigned this Dec 3, 2025
@dolaru dolaru requested review from a team as code owners December 3, 2025 17:11
@dolaru dolaru added release_note:skip Skip the PR/issue when compiling release notes backport:all-open Backport to all branches that could still receive a release labels Dec 3, 2025
Because Scout is based on Playwright, detailed information about tests is only available while Playwright is running.
This means that any time we need test-level information from a test config file we have to start a Playwright process
which can be quite slow and resource-intensive if you want to do this for a larger number of tests configurations.

These changes are trying to address that by introducing a system where this runtime-only information is stored in
manifest files, stored in the proximity of test config files, automatically kept up to date by CI.

### Usage
Locally, run the new kbn-scout CLI command (via `node scripts/scout update-test-config-manifests`) to regenerate manifests.
  - Running without `--includingUpToDate` will only regenerate manifests that appear outdated (component directory SHA mismatch)
  - Use `--includingUpToDate` to force regenerate all manifests

In Buildkite, `node scripts/scout update-test-config-manifests` runs as a quick check and any changes will be auto-commited.

### Notable changes
- Add Scout reporting package with a registry of test configs and components
- Add a Playwright reporter that writes manifest files that capture test information for static analysis
- Add a Scout CLI command `update-test-config-manifests` to create/update manifests
- Add a versatile Playwright CLI wrapper for Scout tooling to call Playwright programmatically
- Add Buildkite quick check to run manifest updates and commit any changes as `[Scout] Automated config manifest updates`
- Add new path constants/globs/regex for discovering Scout configs
- Changed how test IDs are calculated for Scout: combine test file path and test title when hashing
- Remove project name and test file path from Scout test titles
@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 3, 2025

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/scout-info 15 19 +4
@kbn/scout-reporting 111 112 +1
total +5
Unknown metric groups

API count

id before after diff
@kbn/scout-info 15 19 +4
@kbn/scout-reporting 130 131 +1
total +5

ESLint disabled line counts

id before after diff
@kbn/scout-reporting 3 4 +1

Total ESLint disabled count

id before after diff
@kbn/scout-reporting 3 4 +1

History

cc @dolaru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release release_note:skip Skip the PR/issue when compiling release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants