Skip to content

chore(trace): move trace types into isomorphic/trace/versions - #42444

Open
Dmitry Gozman (dgozman) wants to merge 2 commits into
microsoft:mainfrom
dgozman:trace-versions
Open

chore(trace): move trace types into isomorphic/trace/versions#42444
Dmitry Gozman (dgozman) wants to merge 2 commits into
microsoft:mainfrom
dgozman:trace-versions

Conversation

@dgozman

Copy link
Copy Markdown
Collaborator

Summary

  • Move packages/trace/src/trace.ts to packages/isomorphic/trace/versions/traceV9.ts, inlining snapshot.ts; move har.ts next to it and inline it into traceV8.ts.
  • Add packages/isomorphic/trace/trace.ts that re-exports the latest version, and use it across the codebase. packages/trace and the @trace alias are gone.
  • Fold _normalizeResourceReferences() into _modernize_8_to_9(), since trace-relative paths were introduced in v9.
  • Rename VideoTraceEvent.timestampOrigin to timestamp and add pageId; add pageId and timestamp to ScreenshotTraceEvent and AriaSnapshotTraceEvent.

- move `trace.ts` to `isomorphic/trace/versions/traceV9.ts`, inlining `snapshot.ts`
- move `har.ts` next to it, and inline it into `traceV8.ts`
- add `isomorphic/trace/trace.ts` re-exporting the latest version, use it everywhere
- drop the now empty `packages/trace` and its `@trace` alias
- fold `_normalizeResourceReferences` into `_modernize_8_to_9`
- rename `VideoTraceEvent.timestampOrigin` to `timestamp`, add `pageId`
- add `pageId` and `timestamp` to `ScreenshotTraceEvent` and `AriaSnapshotTraceEvent`
- adjust the new timestamps in `adjustMonotonicTime()`
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky⚠️ [chromium-library] › library/video.spec.ts:664 › screencast › should capture full viewport `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-event-request.spec.ts:181 › should return response body when Cross-Origin-Opener-Policy is set `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-test-attachments.spec.ts:61 › should contain binary attachment `@windows-latest-node22`

51248 passed, 1240 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

4 failed
❌ [chromium] › mcp/clipboard.spec.ts:19 › clipboard write without permission dialog @mcp-macos-latest-chromium
❌ [chromium] › mcp/clipboard.spec.ts:19 › clipboard write without permission dialog @mcp-windows-latest-chromium
❌ [chromium] › mcp/clipboard.spec.ts:19 › clipboard write without permission dialog @mcp-ubuntu-latest-chromium
❌ [firefox] › mcp/annotate.spec.ts:446 › should switch screencast to -s session on show --annotate @mcp-windows-latest-firefox

8255 passed, 1361 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 CI is clear — both failures are pre-existing flakes

Hi, I'm the Playwright bot and I took a first look at the CI failures here.

This PR moves trace types around (packages/tracepackages/isomorphic/trace) and renames some trace-event fields. The two red MCP tests don't touch that code path, and both have long flake histories on SHAs this PR can't be responsible for — including the PR's own base commit. Nothing here looks caused by your change.

Details

Overall: the "tests 1" report is green (5 within-run flakes, no failures). The "MCP" report has 4 reds, which collapse into 2 stories once grouped across OS/browser. Both are established, bimodal flakes.

Pre-existing flake / infra

Each square is one run attempt (oldest → newest); 🟩 passed, 🟧 rescued on retry, 🟥 failed.

Triaged by the Playwright bot - agent run

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dgozman