Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Read debug IDs from debugId field in sourcemaps #2222

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 61 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ sentry = { version = "0.34.0", default-features = false, features = [
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.93"
sha1_smol = { version = "1.0.0", features = ["serde"] }
sourcemap = { version = "7.0.1", features = ["ram_bundle"] }
symbolic = { version = "12.12.0", features = ["debuginfo-serde", "il2cpp"] }
sourcemap = { version = "9.0.1", features = ["ram_bundle"] }
symbolic = { version = "12.12.1", features = ["debuginfo-serde", "il2cpp"] }
thiserror = "1.0.38"
url = "2.3.1"
username = "0.2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```
$ sentry-cli sourcemaps upload tests/integration/_fixtures/upload_debugid_alias
? success
> Found 2 files
> Analyzing 2 sources
> Rewriting sources
> Adding source map references
> Bundled 2 files for upload
> Bundle ID: [..]-[..]-[..]-[..]-[..]
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: wat-org
> Project: wat-project
> Release: None
> Dist: None
> Upload type: artifact bundle

Source Map Upload Report
Scripts
~/server/chunks/1.js (sourcemap at 1.js.map, debug id 2297b93d-928d-421e-8910-127c786382da)
Source Maps
~/server/chunks/1.js.map (debug id 2297b93d-928d-421e-8910-127c786382da)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions tests/integration/sourcemaps/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ fn command_sourcemaps_upload_some_debugids_v2() {
assert_endpoints(&upload_endpoints);
}

/// Tests that debug IDs can be found under the "debugId" field in sourcemaps.
#[test]
fn command_sourcemaps_upload_debugid_alias() {
let upload_endpoints = mock_common_upload_endpoints(ServerBehavior::Modern, Default::default());
register_test("sourcemaps/sourcemaps-upload-debugid-alias.trycmd");
assert_endpoints(&upload_endpoints);
}

#[test]
fn command_sourcemaps_upload_no_debugids() {
let _upload_endpoints =
Expand Down
Loading