Skip to content

Conversation

@szokeasaurusrex
Copy link
Member

Description

Adds investigation.md detailing whether sentry-cli can upload source files twice during sourcemap uploads. The investigation concludes that duplication can occur when original .js source files are present in the upload directory alongside sourcemaps that embed their sourcesContent. It also outlines scenarios where this happens and where it doesn't, along with technical details and potential solutions.

Issues


Open in Cursor Open in Web

Investigate whether sentry-cli uploads source files twice during
sourcemap upload when sources are embedded in sourcesContent.

Key findings:
- Duplication CAN occur when original .js files exist in upload path
- Modern build tools typically avoid this by separating dist/ from src/
- TypeScript/JSX sources are not affected (different extensions)
- Current behavior is technically correct but could be optimized

The investigation confirms the colleague's observation is valid for
specific build configurations where both original JS sources and
sourcemaps with sourcesContent exist in the same upload directory.
@cursor
Copy link

cursor bot commented Nov 22, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- Investigate source file upload duplication ([#2977](https://github.com/getsentry/sentry-cli/pull/2977))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against c6f28fa

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