Skip to content

feat(difs): Add Objectstore-only DIF creation - #120183

Merged
lcian merged 24 commits into
masterfrom
ref/objectstore-debugfiles-dif-storage
Aug 6, 2026
Merged

feat(difs): Add Objectstore-only DIF creation#120183
lcian merged 24 commits into
masterfrom
ref/objectstore-debugfiles-dif-storage

Conversation

@lcian

@lcian lcian commented Jul 21, 2026

Copy link
Copy Markdown
Member

Introduces a new feature flag organizations:objectstore-debugfiles-exclusive-write that creates Objectstore-only debug files.
Restructures create_dif_from_id so that it handles all possible DIF creation cases (legacy File, double write, Objectstore-only) internally based on the active feature flags.
This means that legacy DIF uploads (non-chunked and DIF uploads) automatically get the correct behavior as they call into this function.
Chunk-upload+assemble are updated in a follow-up PR.

Refs FS-365

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 21, 2026
@lcian lcian changed the title ref(debug-files): add objectstore-only DIF creation ref(debug-files): Add objectstore-only DIF creation Jul 29, 2026
@lcian lcian changed the title ref(debug-files): Add objectstore-only DIF creation ref(difs): Add objectstore-only DIF creation Jul 29, 2026
@lcian lcian changed the title ref(difs): Add objectstore-only DIF creation feat(difs): Add objectstore-only DIF creation Jul 29, 2026
@lcian
lcian requested a review from a team July 29, 2026 15:19
@linear-code

linear-code Bot commented Jul 29, 2026

Copy link
Copy Markdown

FS-365

@lcian
lcian marked this pull request as ready for review July 30, 2026 10:09
@lcian
lcian requested a review from a team as a code owner July 30, 2026 10:09

@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 357e027. Configure here.

Comment thread src/sentry/models/debugfile.py Outdated
cursoragent and others added 2 commits July 30, 2026 10:27
Use debug_files instead of debug-files so create_objectstore_dif_from_id
matches create_dif_from_id and other debug-file storage metrics.

Co-authored-by: Lorenzo Cian <lcian@users.noreply.github.com>

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

From #120184, can we bring in the objectstore-debugfiles-exclusive-write feature flag and then consolidate the implementation so that:

  • When exclusive-write is enabled, we write to only objectstore
  • When double-write is enabled, we write to both
  • Otherwise, we write to only filestore

It looks like if we slightly refactor the interfaces going into detect_dif_from_id, we can do these checks fully internally.

@lcian lcian changed the title feat(difs): Add objectstore-only DIF creation feat(difs): Add Objectstore-only DIF creation Jul 31, 2026
@lcian
lcian marked this pull request as draft July 31, 2026 14:04
@lcian
lcian marked this pull request as ready for review August 3, 2026 08:14
@lcian
lcian requested a review from jan-auer August 3, 2026 08:27
# Conflicts:
#	src/sentry/models/debugfile.py
@lcian
lcian enabled auto-merge (squash) August 6, 2026 10:07
@lcian
lcian disabled auto-merge August 6, 2026 10:10
@lcian
lcian enabled auto-merge (squash) August 6, 2026 10:11
@lcian
lcian disabled auto-merge August 6, 2026 10:17
@lcian
lcian enabled auto-merge (squash) August 6, 2026 10:18
Comment thread src/sentry/models/debugfile.py Outdated
@lcian
lcian disabled auto-merge August 6, 2026 12:05
@lcian
lcian enabled auto-merge (squash) August 6, 2026 12:25
@lcian
lcian merged commit 905885e into master Aug 6, 2026
93 checks passed
@lcian
lcian deleted the ref/objectstore-debugfiles-dif-storage branch August 6, 2026 12:42
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants