Retain Playwright e2e test's trace on failure on CI #40586
Merged
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.
What?
Originally since #38570, traces are only recorded on CI on the first retry. This PR changes it to retain trace on every failure instead.
Why?
The original idea is to avoid slowing down the tests on CI if they're all passing since recording traces adds a little bit of overhead. However, this makes some flaky tests hard to debug when they always pass on the first retry (#40307) and basically makes the trace useless. Furthermore, the overhead of recording traces seems to be pretty minimal on CI. Hence, I propose to enable recording traces on every test run instead.
Videos are still being recorded only on the first retry, though. Recording videos seems to have a bigger impact on performance and traces are almost always more useful than videos anyway. We can discuss if we want to remove video recording altogether if needed.
How?
Change via the global settings.
Testing Instructions
N/A