Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scout] fix playwright configs discovery script and add save flag for CI #213147

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dmlemeshko
Copy link
Member

@dmlemeshko dmlemeshko commented Mar 4, 2025

Summary

This PR fixes the search logic to look for playwright configs in all possible & expected locations (src/* was not working), matching one of 3 regexp:

      /(x-pack\/platform\/plugins\/(?:private|shared|[^\/]+)\/([^\/]+))\/ui_tests\//,
      /(x-pack\/solutions\/[^\/]+\/plugins\/([^\/]+))\/ui_tests\//,
      /(src\/platform\/plugins\/(?:private|shared)?\/?([^\/]+))\/ui_tests\//,

For each plugin we also have usesParallelWorkers prop (true if at least 1 config runs with concurrent workers) to decide later, if we need worker with 4 or 8 VCPUs.

The idea is to run node scripts/scout discover-playwright-configs --save on CI and use generated json as source to build test run pipeline.

Current output:

{
  "discover_enhanced": {
    "group": "platform",
    "pluginPath": "x-pack/platform/plugins/private/discover_enhanced",
    "configs": [
      "x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts",
      "x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts"
    ],
    "usesParallelWorkers": true
  },
  "maps": {
    "group": "platform",
    "pluginPath": "x-pack/platform/plugins/shared/maps",
    "configs": [
      "x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts"
    ],
    "usesParallelWorkers": false
  },
  "observability_onboarding": {
    "group": "observability",
    "pluginPath": "x-pack/solutions/observability/plugins/observability_onboarding",
    "configs": [
      "x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/parallel.playwright.config.ts",
      "x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts"
    ],
    "usesParallelWorkers": true
  }
}

@dmlemeshko dmlemeshko self-assigned this Mar 4, 2025
@dmlemeshko dmlemeshko added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:version Backport to applied version labels test:scout v9.1.0 v8.19.0 labels Mar 4, 2025
@dmlemeshko dmlemeshko marked this pull request as ready for review March 4, 2025 17:12
@dmlemeshko dmlemeshko requested a review from a team as a code owner March 4, 2025 17:12
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @dmlemeshko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes test:scout v8.19.0 v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants