Skip to content

fix(error-tracking): preserve URL path separators on Windows - #589

Open
dajiaohuang wants to merge 2 commits into
DataDog:masterfrom
dajiaohuang:repostew/fix-windows-sourcemap-url-20261016
Open

dajiaohuang wants to merge 2 commits into
DataDog:masterfrom
dajiaohuang:repostew/fix-windows-sourcemap-url-20261016

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Oct 16, 2026 •

Copy link
Copy Markdown

What and why?

On Windows, the documented path-only errorTracking.sourcemaps.minifiedPathPrefix is joined using the host filesystem separator. A real esbuild consumer with /static/js and assets/main.js passed \static\js\assets\main.js to the sourcemap sender instead of /static/js/assets/main.js.

This is independent of the debug-ID quoting change in #529; it does not change debug-ID extraction.

How?

Normalize native relative-path separators and use POSIX joining only for path-only URL prefixes. Filesystem paths and full-URL handling remain unchanged. Add a public-adapter build regression for all five supported bundlers and clarify the URL-path documentation.

Validation

  • Windows base-failing esbuild consumer reproduced the incorrect URL above; the minimal correction passed that reproduction.
  • Final focused public-adapter regression: 5/5 passed (esbuild, Rollup, Rspack, Vite, Webpack), with tiny owned fixtures and the final sender mocked. Seven older tests in that file were excluded by the focused test-name filter.
  • yarn typecheck:all passed twice; changed TypeScript files pass ESLint and Prettier; git diff --check passed.
  • Tests used Windows Node 24.14.1 and repository Yarn 4.10.3, BUILD_PLUGINS_ENV=test, blocked network, dummy authentication and no real upload.

Limits: the broader local runs were not green (factory 70/71, feature/helpers 138/163, Git 30/44); Windows/POSIX assertion assumptions, missing fixture dependency/Git setup, and the independently repaired URL behavior were distinguished rather than treating these counts as full acceptance. Root yarn format exceeded Windows command-line length; scoped ESLint passed. yarn cli integrity stopped at child spawn yarn ENOENT although bundled Yarn itself ran directly, so full generated/compliance verification remains outstanding. No full browser, hosted-CI, live Datadog, or version-matrix validation is claimed.

@dajiaohuang
dajiaohuang requested a review from a team as a code owner October 16, 2026 06:10
@dajiaohuang
dajiaohuang requested review from mariajanoo and removed request for a team October 16, 2026 06:10
@jakub-g
jakub-g requested review from a team as code owners October 22, 2026 11:26
@jakub-g
jakub-g removed the request for review from mariajanoo October 22, 2026 11:26
@jakub-g

jakub-g commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

@dajiaohuang could you please rebase this PR and sign your commit? We require signed commits for merging.

@crousseaux crousseaux left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to 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.

3 participants