Skip to content

Conversation

jasonyuezhang
Copy link
Owner

Follow up to getsentry#100810 , registration was left out\n\n---\nCopied from getsentry#100898\nOriginal PR: getsentry#100898

Copy link

Register File Deletion Task and Add to Model Deletion Workflow

This pull request registers the File model with the deletion task manager and integrates it into the cleanup routines. It addresses an omission from a previous PR by formally associating the File model with its dedicated deletion task, ensuring that cleanup logic for File objects is correctly managed by the deletion framework.

Key Changes

• Added registration of the File model with FileDeletionTask in manager.register() within src/sentry/deletions/__init__.py.
• Included from .file import * in src/sentry/deletions/defaults/__init__.py to ensure the default deletion behaviors for File are imported.
• Updated models_which_use_deletions_code_path() in src/sentry/runner/commands/cleanup.py to include the File model with its corresponding deletion fields.
• Amended the removals/exclusions logic for cross-project models in remove_cross_project_models() to handle the File model accordingly.

Affected Areas

src/sentry/deletions/__init__.py
src/sentry/deletions/defaults/__init__.py
src/sentry/runner/commands/cleanup.py

This summary was automatically generated by @propel-code-bot

@jasonyuezhang jasonyuezhang force-pushed the yuvmen/register-file-deletion-task branch from 6b77ff8 to c1921ad Compare October 3, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants