Skip to content

fix(debug files): Correctly read WASM IDs - #127557

Merged
loewenheim merged 4 commits into
masterfrom
sebastian/correctly-read-wasm-ids
Oct 21, 2026
Merged

loewenheim merged 4 commits into
masterfrom
sebastian/correctly-read-wasm-ids

Conversation

@loewenheim

@loewenheim loewenheim commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

This updates symbolic to 14.0.0a4 for getsentry/symbolic#1093.

The values that are written as the code and debug ID for WASM files are now correct, but we also reproduce the previous incorrect logic and write the results into the "legacy" fields introduced in #127508. We do this so that symbolication requests coming in with "legacy" IDs can still find their files.

As such, this PR should only be merged and deployed together with #127577.

Implements INGEST-1292.

@loewenheim
loewenheim requested review from a team as code owners October 15, 2026 15:21
@linear-code

linear-code Bot commented Oct 15, 2026

Copy link
Copy Markdown

INGEST-1292

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 15, 2026
legacy_code_id = None
legacy_debug_id = None
if obj.file_format == "wasm" and len(obj.code_id) == 32:
# (INGEST-1282) For WASM files, the "legacy" code ID is the actual

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Please let me know if this comment is unclear or too verbose.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's a good comment.

Comment thread src/sentry/models/debugfile.py Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d75bb35. Configure here.

Comment thread src/sentry/models/debugfile.py Resolved
loewenheim added a commit that referenced this pull request Oct 20, 2026
This uses the `wasm_legacy_code_id` and `wasm_legacy_debug_id` fields,
which we started writing in #127557, for debug file lookups.

This works by making three comparisons instead of one, both for code and
debug IDs. Taking debug IDs as the example:

1. compare the request debug ID to the stored debug ID (this is how it
   works right now)
2. compare the request debug ID to the stored `wasm_legacy_debug_id`
3. compare the legacy debug ID computed from the request to the stored
   debug ID

(1) covers the cases where the request and the stored file agree on the
debug ID. (2) takes care of the case where the file was uploaded with
a correct debug ID, but the request still has the legacy one. (3) handles
the converse case, where the file was uploaded with a legacy ID but the
request has the correct one. For this case, it's essential that the
legacy debug ID can be computed from the correct one.

Implements INGEST-1293.
@loewenheim
loewenheim force-pushed the sebastian/correctly-read-wasm-ids branch from 0e84bb6 to 9ab78ec Compare October 20, 2026 06:58
@loewenheim
loewenheim requested a review from a team October 20, 2026 07:47
legacy_code_id = None
legacy_debug_id = None
if obj.file_format == "wasm" and len(obj.code_id) == 32:
# (INGEST-1282) For WASM files, the "legacy" code ID is the actual

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's a good comment.

@loewenheim
loewenheim merged commit 6deb242 into master Oct 21, 2026
90 checks passed
@loewenheim
loewenheim deleted the sebastian/correctly-read-wasm-ids branch October 21, 2026 07:05
loewenheim added a commit that referenced this pull request Oct 21, 2026
This uses the `wasm_legacy_code_id` and `wasm_legacy_debug_id` fields,
which we started writing in #127557, for debug file lookups.

This works by making three comparisons instead of one, both for code and
debug IDs. Taking debug IDs as the example:

1. compare the request debug ID to the stored debug ID (this is how it
works right now)
2. compare the request debug ID to the stored `wasm_legacy_debug_id`
3. compare the legacy debug ID computed from the request to the stored
debug ID

(1) covers the cases where the request and the stored file agree on the
debug ID. (2) takes care of the case where the file was uploaded with a
correct debug ID, but the request still has the legacy one. (3) handles
the converse case, where the file was uploaded with a legacy ID but the
request has the correct one. For this case, it's essential that the
legacy debug ID can be computed from the correct one.

Implements INGEST-1293.
@loewenheim loewenheim added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Oct 21, 2026
@sentry-fast-revert-bot

Copy link
Copy Markdown
Contributor

revert failed (conflict? already reverted?) -- check the logs

@loewenheim loewenheim added Trigger: Revert Add to a merged PR to revert it (skips CI) and removed Trigger: Revert Add to a merged PR to revert it (skips CI) labels Oct 21, 2026
@loewenheim
loewenheim deployed to fast-revert October 21, 2026 09:16 — with GitHub Actions Active
@sentry-fast-revert-bot

Copy link
Copy Markdown
Contributor

PR reverted: a58aad2

loewenheim added a commit that referenced this pull request Oct 27, 2026
This uses the `wasm_legacy_code_id` and `wasm_legacy_debug_id` fields,
which we started writing in #127557, for debug file lookups.

This works by making three comparisons instead of one, both for code and
debug IDs. Taking debug IDs as the example:

1. compare the request debug ID to the stored debug ID (this is how it
   works right now)
2. compare the request debug ID to the stored `wasm_legacy_debug_id`
3. compare the legacy debug ID computed from the request to the stored
   debug ID

(1) covers the cases where the request and the stored file agree on the
debug ID. (2) takes care of the case where the file was uploaded with
a correct debug ID, but the request still has the legacy one. (3) handles
the converse case, where the file was uploaded with a legacy ID but the
request has the correct one. For this case, it's essential that the
legacy debug ID can be computed from the correct one.

Implements INGEST-1293.
loewenheim added a commit that referenced this pull request Oct 27, 2026
This uses the `wasm_legacy_code_id` and `wasm_legacy_debug_id` fields,
which we started writing in #127557, for debug file lookups.

This works by making three comparisons instead of one, both for code and
debug IDs. Taking debug IDs as the example:

1. compare the request debug ID to the stored debug ID (this is how it
   works right now)
2. compare the request debug ID to the stored `wasm_legacy_debug_id`
3. compare the legacy debug ID computed from the request to the stored
   debug ID

(1) covers the cases where the request and the stored file agree on the
debug ID. (2) takes care of the case where the file was uploaded with
a correct debug ID, but the request still has the legacy one. (3) handles
the converse case, where the file was uploaded with a legacy ID but the
request has the correct one. For this case, it's essential that the
legacy debug ID can be computed from the correct one.

Implements INGEST-1293.
loewenheim added a commit that referenced this pull request Oct 27, 2026
Second try of #127557, which was
reverted in
a58aad2.

This updates symbolic to 14.0.0a4 for
getsentry/symbolic#1093.

The values that are written as the code and debug ID for WASM files are
now correct, but we also reproduce the previous incorrect logic and
write the results into the "legacy" fields introduced in
#127508. We do this so that
symbolication requests coming in with "legacy" IDs can still find their
files.

As such, this PR should only be merged and deployed together with
#128494.

Implements INGEST-1292.
loewenheim added a commit that referenced this pull request Oct 27, 2026
Second try of #127577, which was
reverted in
dad0221.

This uses the wasm_legacy_code_id and wasm_legacy_debug_id fields, which
we started writing in #127557,
for debug file lookups.

This works by making three comparisons instead of one, both for code and
debug IDs. Taking debug IDs as the example:

compare the request debug ID to the stored debug ID (this is how it
works right now)
    compare the request debug ID to the stored wasm_legacy_debug_id
compare the legacy debug ID computed from the request to the stored
debug ID

(1) covers the cases where the request and the stored file agree on the
debug ID. (2) takes care of the case where the file was uploaded with a
correct debug ID, but the request still has the legacy one. (3) handles
the converse case, where the file was uploaded with a legacy ID but the
request has the correct one. For this case, it's essential that the
legacy debug ID can be computed from the correct one.

Implements INGEST-1293.

This branch was successfully deployed

1 active deployment
fast-revert — 9ab78ece Deployed Oct 21, 2026 by loewenheim via revert #10502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Trigger: Revert Add to a merged PR to revert it (skips CI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants