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

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

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…or CI (elastic#213147)

## 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
  }
}
```

(cherry picked from commit 1e3bb05)
@kibanamachine kibanamachine merged commit 1fd3c6b into elastic:9.0 Mar 5, 2025
12 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants