fix(tracing): send addStackToTracingNoReply on the LocalUtils connection - #1967
fix(tracing): send addStackToTracingNoReply on the LocalUtils connection#1967monkey (Develop-KIM) wants to merge 3 commits into
Conversation
Yury Semikhatsky (yury-s)
left a comment
There was a problem hiding this comment.
Do you mind adding a test?
The existing coverage lives in TestBrowserTypeConnect#shouldRecordTraceWithSources, which is skipped unless PLAYWRIGHT_JAVA_SRC is set, and the job that sets it runs only *TestTracing*. The new class passes the source root through Playwright.CreateOptions instead, so it runs in the regular test job.
|
Added a test: |
Since the driver roll in microsoft#1972 the trace zip stores sources as src/<sha1>.<ext> instead of resources/src@<sha1>.txt, so the .txt filter in TestTracingOverConnect found nothing on CI. shouldRecordTraceWithSources in TestBrowserTypeConnect used the same filter and gets the same update.
|
The CI failure came from main rolling the driver to 1.63 (#1972) after this branch was cut: the trace zip now stores sources as |
Summary
Connection.internalSendMessageaddressedaddStackToTracingNoReplytolocalUtils.guidbut sent it over its own transport. For a browser fromconnect()that transport is the server pipe, not the driver connection that ownsLocalUtils, so the stack session opened bytracingStartednever received anything andsetSources(true)produced no sources.localUtils.connectioninstead, matchingthis._localUtils?.addStackToTracingNoReply(...)inpackages/playwright-core/src/client/connection.ts. For a local connection that is the same object, so nothing changes there.TestBrowserTypeConnect#shouldRecordTraceWithSourcesalready covered this and fails onmain(0 sources instead of 1); it passes with the change. It never ran on CI because the sources job filters on-D test=*TestTracing*.Fixes #1962