Skip to content

CLI-153 Fix sourcemap upload#138

Merged
damien-urruty-sonarsource merged 3 commits intomasterfrom
task/dam/fix-sentry-sourcemap
Mar 31, 2026
Merged

CLI-153 Fix sourcemap upload#138
damien-urruty-sonarsource merged 3 commits intomasterfrom
task/dam/fix-sentry-sourcemap

Conversation

@damien-urruty-sonarsource
Copy link
Copy Markdown
Contributor

No description provided.

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title NO-JIRA Debug Sentry source map CLI-223 NO-JIRA Debug Sentry source map Mar 30, 2026
@hashicorp-vault-sonar-prod
Copy link
Copy Markdown

hashicorp-vault-sonar-prod bot commented Mar 30, 2026

CLI-153

@damien-urruty-sonarsource damien-urruty-sonarsource changed the title CLI-223 NO-JIRA Debug Sentry source map CLI-153 Fix sourcemap upload Mar 30, 2026
@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/fix-sentry-sourcemap branch 3 times, most recently from ee4c86f to f1f9b88 Compare March 30, 2026 10:00
@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/fix-sentry-sourcemap branch from f56f022 to fd6b42e Compare March 31, 2026 07:37
@sonarqubecloud
Copy link
Copy Markdown

@damien-urruty-sonarsource damien-urruty-sonarsource marked this pull request as ready for review March 31, 2026 07:42
@sonar-review-alpha
Copy link
Copy Markdown
Contributor

Summary

Refactors sourcemap generation and Sentry integration to work within bun's build constraints. The CLI binaries are now built without external sourcemaps (producing single-file executables), while sourcemaps are generated separately in a follow-up build step specifically for Sentry upload. This prevents the conflict between bun's --compile flag and external sourcemaps. Also disables Sentry initialization during test runs to prevent unintended telemetry.

What reviewers should know

Key architectural change: The sourcemap upload workflow is now split into two stages: (1) build and publish binaries without sourcemaps in the build job, (2) rebuild with sourcemaps and upload to Sentry in the publish-binaries job. This preserves the small, single-file executable format while still uploading debug symbols to Sentry. Test safety: The SONARQUBE_CLI_DISABLE_SENTRY environment variable gates Sentry initialization, so test runs don't send telemetry. Look at the workflow changes to understand the job orchestration, then check src/lib/sentry.ts for the guard condition, and package.json to see how tests now disable Sentry.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

Copy link
Copy Markdown
Contributor

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

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

Conclusion: The restructuring is well-reasoned — bun's --compile flag doesn't support external sourcemaps, so separating the sourcemap generation into a dedicated rebuild is the right approach. One bug needs fixing before merge.

🗣️ Give feedback

Comment thread .github/workflows/build.yml
@damien-urruty-sonarsource damien-urruty-sonarsource merged commit b8a1be9 into master Mar 31, 2026
13 checks passed
@damien-urruty-sonarsource damien-urruty-sonarsource deleted the task/dam/fix-sentry-sourcemap branch March 31, 2026 07:46
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.

2 participants