[8.x] [scout] unique runId for reporting, disabled failed test reporter locally (#209507)#210088
Merged
kibanamachine merged 2 commits intoelastic:8.xfrom Feb 9, 2025
Merged
Conversation
…ally (elastic#209507) ## Summary This PR makes few changes to scout reporter: Recently I found out that Playwright load configuration file _multiple times_: - first time after you run `npx playwright test -c ...` - on every worker start log before: ``` [main][~/github/kibana]$ npx playwright test --config x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts [createPlaywrightConfig] called with runId: 18f35f735a10155c Running 1 test using 1 worker [createPlaywrightConfig] called with runId: 2633b4e4c20afa15 [chromium] › full_screen_mode.spec.ts:28:9 › Maps › Full screen mode @svlSecurity @svlOblt @svlSearch @ess ``` With our current logic unique `runId` will be generated on each configuration load, meaning for parallel run we will report failures in different directories instead of the same one. Playwright doesn't expose any unique identifier for the run, so we have do something similar described in microsoft/playwright#28941 (comment) log after fix: ``` [main][~/github/kibana]$ npx playwright test --config x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts [createPlaywrightConfig] called with runId: 310a576f32d3b8a5 Running 1 test using 1 worker [createPlaywrightConfig] called with runId: 310a576f32d3b8a5 [chromium] › full_screen_mode.spec.ts:28:9 › Maps › Full screen mode @svlSecurity @svlOblt @svlSearch @ess ``` We also had a chat with @dolaru and agreed that Scout reporters to be disabled for local test run. Few reasons: - Scout custom reporting targets CI execution: events-based reporter was already disabled - Failed test reporter purpose is to provide html boilerplate to be annotated in pipeline build - When you run tests with IDE playwright plugin it provides its own reporter / history, should be enough. (cherry picked from commit 6635fe5)
Contributor
💚 Build Succeeded
Metrics [docs]
History
cc @dmlemeshko |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.x:Questions ?
Please refer to the Backport tool documentation
\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Dzmitry Lemechko "}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com//pull/209507","number":209507,"mergeCommit":{"message":"[scout] unique runId for reporting, disabled failed test reporter locally (#209507)\n\n## Summary\r\n\r\nThis PR makes few changes to scout reporter:\r\n\r\nRecently I found out that Playwright load configuration file _multiple\r\ntimes_:\r\n- first time after you run `npx playwright test -c ...`\r\n- on every worker start\r\n\r\nlog before:\r\n\r\n```\r\n[main][~/github/kibana]$ npx playwright test --config x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\r\n[createPlaywrightConfig] called with runId: 18f35f735a10155c\r\n\r\nRunning 1 test using 1 worker\r\n\r\n[createPlaywrightConfig] called with runId: 2633b4e4c20afa15\r\n[chromium] › full_screen_mode.spec.ts:28:9 › Maps › Full screen mode @svlSecurity @svlOblt @svlSearch @ess\r\n```\r\n\r\nWith our current logic unique `runId` will be generated on each\r\nconfiguration load, meaning for parallel run we will report failures in\r\ndifferent directories instead of the same one.\r\n\r\nPlaywright doesn't expose any unique identifier for the run, so we have\r\ndo something similar described in\r\n\r\nhttps://github.com/microsoft/playwright/issues/28941#issuecomment-1888008102\r\n\r\nlog after fix:\r\n\r\n```\r\n[main][~/github/kibana]$ npx playwright test --config x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\r\n[createPlaywrightConfig] called with runId: 310a576f32d3b8a5\r\n\r\nRunning 1 test using 1 worker\r\n\r\n[createPlaywrightConfig] called with runId: 310a576f32d3b8a5\r\n[chromium] › full_screen_mode.spec.ts:28:9 › Maps › Full screen mode @svlSecurity @svlOblt @svlSearch @ess\r\n```\r\n\r\nWe also had a chat with @dolaru and agreed that Scout reporters to be\r\ndisabled for local test run. Few reasons:\r\n- Scout custom reporting targets CI execution: events-based reporter was\r\nalready disabled\r\n- Failed test reporter purpose is to provide html boilerplate to be\r\nannotated in pipeline build\r\n- When you run tests with IDE playwright plugin it provides its own\r\nreporter / history, should be enough.","sha":"6635fe501c307d567afa71a346fc91a7675e3cc5"}}]}] BACKPORT-->