Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[9.0] [scout] fix playwright configs discovery script and add
save
…
…flag for CI (#213147) (#213242) # Backport This will backport the following commits from `main` to `9.0`: - [[scout] fix playwright configs discovery script and add `save` flag for CI (#213147)](#213147) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-03-05T13:49:43Z","message":"[scout] fix playwright configs discovery script and add `save` flag for CI (#213147)\n\n## Summary\n\nThis PR fixes the search logic to look for playwright configs in all\npossible & expected locations (`src/*` was not working), matching one of\n3 regexp:\n```\n /(x-pack\\/platform\\/plugins\\/(?:private|shared|[^\\/]+)\\/([^\\/]+))\\/ui_tests\\//,\n /(x-pack\\/solutions\\/[^\\/]+\\/plugins\\/([^\\/]+))\\/ui_tests\\//,\n /(src\\/platform\\/plugins\\/(?:private|shared)?\\/?([^\\/]+))\\/ui_tests\\//,\n```\n\nFor each plugin we also have `usesParallelWorkers` prop (`true` if at\nleast 1 config runs with concurrent workers) to decide later, if we need\nworker with 4 or 8 VCPUs.\n\nThe idea is to run `node scripts/scout discover-playwright-configs\n--save` on CI and use generated json as source to build test run\npipeline.\n\nCurrent output:\n\n```\n{\n \"discover_enhanced\": {\n \"group\": \"platform\",\n \"pluginPath\": \"x-pack/platform/plugins/private/discover_enhanced\",\n \"configs\": [\n \"x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts\",\n \"x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": true\n },\n \"maps\": {\n \"group\": \"platform\",\n \"pluginPath\": \"x-pack/platform/plugins/shared/maps\",\n \"configs\": [\n \"x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": false\n },\n \"observability_onboarding\": {\n \"group\": \"observability\",\n \"pluginPath\": \"x-pack/solutions/observability/plugins/observability_onboarding\",\n \"configs\": [\n \"x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/parallel.playwright.config.ts\",\n \"x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": true\n }\n}\n```","sha":"1e3bb05734ed5825df802fb32a31b3c07106bee4","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout] fix playwright configs discovery script and add `save` flag for CI","number":213147,"url":"https://github.com/elastic/kibana/pull/213147","mergeCommit":{"message":"[scout] fix playwright configs discovery script and add `save` flag for CI (#213147)\n\n## Summary\n\nThis PR fixes the search logic to look for playwright configs in all\npossible & expected locations (`src/*` was not working), matching one of\n3 regexp:\n```\n /(x-pack\\/platform\\/plugins\\/(?:private|shared|[^\\/]+)\\/([^\\/]+))\\/ui_tests\\//,\n /(x-pack\\/solutions\\/[^\\/]+\\/plugins\\/([^\\/]+))\\/ui_tests\\//,\n /(src\\/platform\\/plugins\\/(?:private|shared)?\\/?([^\\/]+))\\/ui_tests\\//,\n```\n\nFor each plugin we also have `usesParallelWorkers` prop (`true` if at\nleast 1 config runs with concurrent workers) to decide later, if we need\nworker with 4 or 8 VCPUs.\n\nThe idea is to run `node scripts/scout discover-playwright-configs\n--save` on CI and use generated json as source to build test run\npipeline.\n\nCurrent output:\n\n```\n{\n \"discover_enhanced\": {\n \"group\": \"platform\",\n \"pluginPath\": \"x-pack/platform/plugins/private/discover_enhanced\",\n \"configs\": [\n \"x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts\",\n \"x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": true\n },\n \"maps\": {\n \"group\": \"platform\",\n \"pluginPath\": \"x-pack/platform/plugins/shared/maps\",\n \"configs\": [\n \"x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": false\n },\n \"observability_onboarding\": {\n \"group\": \"observability\",\n \"pluginPath\": \"x-pack/solutions/observability/plugins/observability_onboarding\",\n \"configs\": [\n \"x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/parallel.playwright.config.ts\",\n \"x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": true\n }\n}\n```","sha":"1e3bb05734ed5825df802fb32a31b3c07106bee4"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213147","number":213147,"mergeCommit":{"message":"[scout] fix playwright configs discovery script and add `save` flag for CI (#213147)\n\n## Summary\n\nThis PR fixes the search logic to look for playwright configs in all\npossible & expected locations (`src/*` was not working), matching one of\n3 regexp:\n```\n /(x-pack\\/platform\\/plugins\\/(?:private|shared|[^\\/]+)\\/([^\\/]+))\\/ui_tests\\//,\n /(x-pack\\/solutions\\/[^\\/]+\\/plugins\\/([^\\/]+))\\/ui_tests\\//,\n /(src\\/platform\\/plugins\\/(?:private|shared)?\\/?([^\\/]+))\\/ui_tests\\//,\n```\n\nFor each plugin we also have `usesParallelWorkers` prop (`true` if at\nleast 1 config runs with concurrent workers) to decide later, if we need\nworker with 4 or 8 VCPUs.\n\nThe idea is to run `node scripts/scout discover-playwright-configs\n--save` on CI and use generated json as source to build test run\npipeline.\n\nCurrent output:\n\n```\n{\n \"discover_enhanced\": {\n \"group\": \"platform\",\n \"pluginPath\": \"x-pack/platform/plugins/private/discover_enhanced\",\n \"configs\": [\n \"x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts\",\n \"x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": true\n },\n \"maps\": {\n \"group\": \"platform\",\n \"pluginPath\": \"x-pack/platform/plugins/shared/maps\",\n \"configs\": [\n \"x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": false\n },\n \"observability_onboarding\": {\n \"group\": \"observability\",\n \"pluginPath\": \"x-pack/solutions/observability/plugins/observability_onboarding\",\n \"configs\": [\n \"x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/parallel.playwright.config.ts\",\n \"x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts\"\n ],\n \"usesParallelWorkers\": true\n }\n}\n```","sha":"1e3bb05734ed5825df802fb32a31b3c07106bee4"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
- Loading branch information