Skip to content

feat(sourcemaps): Set has_debug_ids when linking an artifact bundle to a project - #130422

Merged
jan-auer merged 3 commits into
masterfrom
feat/artifact-bundle-write-has-debug-ids
Nov 13, 2026
Merged

jan-auer merged 3 commits into
masterfrom
feat/artifact-bundle-write-has-debug-ids

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

ProjectArtifactBundle.has_debug_ids tells if the linked bundle has files with debug IDs. The source map debugger uses it in #130425, so that it does not read the DebugIdArtifactBundle rows.

The upload sets the flag on each project link that it creates or updates. The flag comes from the uploaded archive, both for a new bundle and for an existing one, for example when someone uploads the same bundle to a new project. So linking never reads DebugIdArtifactBundle rows, which we want to move out of Postgres.

For an existing bundle, the archive can in theory differ from the debug-ID rows written by its first upload, if the same bundle_id comes with different content. The flag then describes the latest upload, which is what the debugger wants to know: whether the project's tooling uploads files with debug IDs.

The demo-mode sync does not copy debug-ID rows, so its links keep the default false.

Requires #130421

via @jan-auer.

--

View Session [Sentry]

@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 9, 2026 14:00
@sentry-junior
sentry-junior Bot added this pull request to stack #130423 November 9, 2026 14:01
@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
@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 feat/artifact-bundle-write-has-debug-ids branch from f35549c to e4f9349 Compare November 10, 2026 15:32
@sentry-junior sentry-junior Bot changed the title feat(sourcemaps): Set has_debug_ids when assembling an artifact bundle feat(sourcemaps): Set has_debug_ids when linking an artifact bundle to a project Nov 10, 2026
@sentry-junior
sentry-junior Bot dismissed lcian’s stale review November 10, 2026 15:33

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 feat/artifact-bundle-write-has-debug-ids branch from e4f9349 to 1f05b9c Compare November 11, 2026 23:13
@sentry-junior
sentry-junior Bot force-pushed the feat/artifact-bundle-write-has-debug-ids branch from c0c77c2 to e88c02a Compare November 12, 2026 20:21
@sentry

sentry Bot commented Nov 12, 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

@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.

Reviewed by Cursor Bugbot for commit e88c02a. Configure here.

Comment thread src/sentry/tasks/assemble.py Resolved
@sentry-junior
sentry-junior Bot force-pushed the feat/artifact-bundle-write-has-debug-ids branch 2 times, most recently from a6e8ef0 to 4470b1c Compare November 13, 2026 09:15
Base automatically changed from feat/artifact-bundle-has-debug-ids-schema to master November 13, 2026 09:24
@jan-auer
jan-auer requested review from a team as code owners November 13, 2026 09:24
sentry-junior Bot and others added 3 commits November 13, 2026 10:24
…o a project

A link to a new bundle gets the flag from whether its archive has files with debug IDs, which is also when the bundle's DebugIdArtifactBundle rows are written. A re-upload of an existing bundle writes no debug-ID rows, so its links get the flag from whether the bundle already has them.

Co-Authored-By: Jan Michael Auer <[email protected]>
…dles

Linking an existing bundle to a project read the bundle's debug-ID rows to set the flag. It now uses the uploaded archive, as for a new bundle, so the upload no longer reads DebugIdArtifactBundle rows.

Co-Authored-By: async jauer <[email protected]>
…ndle is re-dated

With sourcemaps.artifact-bundles.date-only-on-bundle on, get_or_create kept
the old has_debug_ids on a link that already existed, so a re-upload did not
correct a link that still had the column default. Write the flag when it
differs from the archive.
@jan-auer
jan-auer force-pushed the feat/artifact-bundle-write-has-debug-ids branch from 4470b1c to e36737c Compare November 13, 2026 09:24
@jan-auer
jan-auer merged commit 0e577f0 into master Nov 13, 2026
78 checks passed
@jan-auer
jan-auer deleted the feat/artifact-bundle-write-has-debug-ids branch November 13, 2026 09:35
jan-auer added a commit that referenced this pull request Nov 13, 2026
…t bundles (#130424)

Links created before #130422 have `has_debug_ids = false`, also when
their bundle has debug-ID rows. This PR adds two post-deployment
migrations.


Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Jan Michael Auer <[email protected]>
Co-authored-by: Lorenzo Cian <[email protected]>
@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.

4 participants