Skip to content

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

Merged
jan-auer merged 1 commit into
masterfrom
ref/source-map-debug-read-has-debug-ids
Nov 17, 2026
Merged

jan-auer merged 1 commit into
masterfrom
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 932 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.

@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
@sentry-junior
sentry-junior Bot force-pushed the ref/source-map-debug-read-has-debug-ids branch 5 times, most recently from f611952 to 1538b96 Compare November 13, 2026 09:15
@jan-auer
jan-auer force-pushed the ref/source-map-debug-read-has-debug-ids branch from 1538b96 to 8d81826 Compare November 13, 2026 09:24
@jan-auer
jan-auer force-pushed the ref/source-map-debug-read-has-debug-ids branch from 8d81826 to c7174b0 Compare November 13, 2026 09:35
Base automatically changed from feat/backfill-artifact-bundle-has-debug-ids to master November 13, 2026 10:01
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 <[email protected]>
Co-Authored-By: Lorenzo Cian <[email protected]>
@jan-auer
jan-auer force-pushed the ref/source-map-debug-read-has-debug-ids branch from c7174b0 to fe97b9a Compare November 13, 2026 10:01
@jan-auer
jan-auer marked this pull request as ready for review November 16, 2026 11:36
@jan-auer
jan-auer requested review from a team as code owners November 16, 2026 11:36
@jan-auer
jan-auer requested review from JPeer264 and removed request for a team November 16, 2026 11:36
@sentry-junior
sentry-junior Bot requested a review from jan-auer November 16, 2026 11:36

@lcian lcian left a comment

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.

Looks good to me.

@jan-auer
jan-auer merged commit f8070cc into master Nov 17, 2026
98 checks passed
@jan-auer
jan-auer deleted the ref/source-map-debug-read-has-debug-ids branch November 17, 2026 08:39
jan-auer added a commit that referenced this pull request Nov 17, 2026
…-store

* ref/inline-payload-defaults: (2542 commits)
  feat(classifiers): Support search syntax in classifier list query (#131423)
  ref(settings): Update settings tour entry copy (#131424)
  fix(conversations): Track tab switch from the View Timeline button (#131196)
  ref(sourcemaps): Read has_debug_ids in the source map debugger (#130425)
  ci(acceptance): Re-run on the override selective testing label (#131408)
  feat(inbox): Include inbox URLs in item responses (#131406)
  ref(flags): Remove `organizations:jira-explicit-mapping-removals` (frontend) (#130393)
  ci(acceptance): Select acceptance tests on pull requests (#131325)
  fix(audit-log): Render legacy internal integration token entries (#131042)
  ref(api): Drop the isRecord guard from SentryApiError body reads (#131394)
  ref: bump sentry-protos to 0.120.1 (#131396)
  feat(inbox): add URL configuration for inbox events (#131336)
  fix(circuit-breaker): Don't raise from record_error or record_success when redis fails (#131364)
  fix(redis): Let cluster client_args set the per-node connection limit (#131355)
  fix(sentry-apps): Stop retrying service hooks to blocked or unreachable URLs (#131171)
  fix(charts): Stop tooltip errors when a chart refresh removes series (#131341)
  perf(crons): Make the check-in timeout index partial (#131376)
  feat(api): Know per-operation error codes and read top-level codes (#131362)
  feat(api): Generate error codes and challenge fields from the spec (#131287)
  feat(apidocs): Mark auth-challenge error codes in the error component (#131346)
  ...

# Conflicts:
#	src/sentry/conf/server.py
#	src/sentry/event_manager.py
#	src/sentry/ingest/consumer/attachment_event.py
#	src/sentry/ingest/consumer/processors.py
#	src/sentry/processing/backpressure/topology.py
#	src/sentry/tasks/store.py
#	tests/sentry/ingest/ingest_consumer/test_ingest_consumer_kafka.py
#	tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py
#	tests/sentry/processing/backpressure/test_checking.py
#	tests/sentry/processing/backpressure/test_monitoring.py
#	tests/sentry/tasks/test_post_process.py
#	tests/sentry/tasks/test_store.py
#	tests/sentry/tasks/test_symbolication.py
xb18 pushed a commit to xb18/sentry that referenced this pull request Nov 22, 2026
…defaults

* origin/master: (2542 commits)
  feat(classifiers): Support search syntax in classifier list query (getsentry#131423)
  ref(settings): Update settings tour entry copy (getsentry#131424)
  fix(conversations): Track tab switch from the View Timeline button (getsentry#131196)
  ref(sourcemaps): Read has_debug_ids in the source map debugger (getsentry#130425)
  ci(acceptance): Re-run on the override selective testing label (getsentry#131408)
  feat(inbox): Include inbox URLs in item responses (getsentry#131406)
  ref(flags): Remove `organizations:jira-explicit-mapping-removals` (frontend) (getsentry#130393)
  ci(acceptance): Select acceptance tests on pull requests (getsentry#131325)
  fix(audit-log): Render legacy internal integration token entries (getsentry#131042)
  ref(api): Drop the isRecord guard from SentryApiError body reads (getsentry#131394)
  ref: bump sentry-protos to 0.120.1 (getsentry#131396)
  feat(inbox): add URL configuration for inbox events (getsentry#131336)
  fix(circuit-breaker): Don't raise from record_error or record_success when redis fails (getsentry#131364)
  fix(redis): Let cluster client_args set the per-node connection limit (getsentry#131355)
  fix(sentry-apps): Stop retrying service hooks to blocked or unreachable URLs (getsentry#131171)
  fix(charts): Stop tooltip errors when a chart refresh removes series (getsentry#131341)
  perf(crons): Make the check-in timeout index partial (getsentry#131376)
  feat(api): Know per-operation error codes and read top-level codes (getsentry#131362)
  feat(api): Generate error codes and challenge fields from the spec (getsentry#131287)
  feat(apidocs): Mark auth-challenge error codes in the error component (getsentry#131346)
  ...

# Conflicts:
#	tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py
#	tests/sentry/tasks/test_reprocessing2.py
#	tests/sentry/tasks/test_store.py
#	tests/sentry/tasks/test_symbolication.py
@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

FS-659

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