Skip to content

ref(sourcemaps): Read has_debug_ids in the source map debugger - #130425

Draft
sentry-junior[bot] wants to merge 1 commit into
feat/backfill-artifact-bundle-has-debug-idsfrom
ref/source-map-debug-read-has-debug-ids
Draft

sentry-junior[bot] wants to merge 1 commit into
feat/backfill-artifact-bundle-has-debug-idsfrom
ref/source-map-debug-read-has-debug-ids

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The source map debugger checks if a project uploaded any file with a debug ID. This check now queries ProjectArtifactBundle for a link of the project with has_debug_ids = true. It does not read the debug-ID rows of the organization anymore.

The partial index from #130424 answers this query with one index lookup. This is true when the project has such a link and when it does not. A local check on a synthetic table with 2M rows gave an index-only scan on the partial index that read 4 to 6 buffers in both cases.

The query is now bounded, so this PR removes the debug-id-check-max-bundles cap and its code path. The cap also gave a wrong result for projects whose debug IDs were only in older bundles. The option stays registered for now. First remove its value from the options automator. Then remove the registration in a follow-up PR.

The lookup of the debug IDs of the event still uses the debug-ID table, because it needs the file type of each debug ID.

Merge this PR only after both post-deployment migrations from #130424 ran in all regions. Without the index, this query reads all links of the project.

Requires #130424

via @jan-auer.

--

View Session [Sentry]

@sentry-junior
sentry-junior Bot added this pull request to stack #130423 November 9, 2026 14:04
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 9, 2026
lcian
lcian previously approved these changes Nov 9, 2026
@sentry-junior
sentry-junior Bot force-pushed the ref/source-map-debug-read-has-debug-ids branch from d99b69d to 6b28c6c Compare November 9, 2026 16:06
@sentry

sentry Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 812 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@sentry-junior
sentry-junior Bot force-pushed the ref/source-map-debug-read-has-debug-ids branch from 6b28c6c to 6affdfd Compare November 9, 2026 16:37
@mchen-sentry mchen-sentry added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Nov 9, 2026
@sentry-junior
sentry-junior Bot force-pushed the ref/source-map-debug-read-has-debug-ids branch from 5bee948 to 2430a48 Compare November 10, 2026 15:32
@sentry-junior
sentry-junior Bot dismissed lcian’s stale review November 10, 2026 15:34

The stack changed: has_debug_ids moved from ArtifactBundle to ProjectArtifactBundle with a partial index on project_id, and the PRs are rebased on master. Please review again.

When none of an event's debug IDs matched, project_has_some_artifact_with_a_debug_id now checks the has_debug_ids flag on the project's ProjectArtifactBundle links. The partial index answers this with one lookup, whether or not the project has such a link, so the check no longer reads DebugIdArtifactBundle and no longer needs the debug-id-check-max-bundles cap. The option stays registered until the automator stops setting it.

Co-Authored-By: Jan Michael Auer <1433023+jan-auer@users.noreply.github.com>
Co-Authored-By: Lorenzo Cian <lorenzo.cian@sentry.io>
@sentry-junior
sentry-junior Bot force-pushed the ref/source-map-debug-read-has-debug-ids branch from 2430a48 to e66f49e Compare November 11, 2026 23:13

This branch was successfully deployed

1 active (outdated) deployment
Preview — 5bee9484 Deployed Nov 9, 2026 by vercel[bot]
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: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants