feat(seer): Add SeerRun retention cleanup via incinerator#118606
Draft
trevor-e wants to merge 2 commits into
Draft
feat(seer): Add SeerRun retention cleanup via incinerator#118606trevor-e wants to merge 2 commits into
trevor-e wants to merge 2 commits into
Conversation
Register SeerRun in the deletions code path so the `sentry cleanup` command can age out old runs, matching Seer's 30-day run_state TTL. Deletion cascades to SeerRunPullRequest and SeerAgentRun; Night Shift links are SET_NULL and survive. The accompanying getsentry-incinerator CronJob (--model=SeerRun --days=30) lives in the ops repo and ships separately.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a7a87dd. Configure here.
SeerRun is organization-scoped and has no project_id, so the --project cleanup path would error filtering on a nonexistent column and silently skip SeerRun retention. Drop it from the deletes list in remove_cross_project_models, alongside the other cross-project models.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds 30-day retention cleanup for
SeerRun, matching Seer's existingrun_stateTTL. Nothing aged these rows out before (org deletion cascades, but there was no TTL sweep).Implemented via the incinerator (
sentry cleanup):SeerRuntomodels_which_use_deletions_code_path()sosentry cleanup --model=SeerRun --days=30deletes old runs through the deletions framework.SeerRunwithModelDeletionTask. Cascades toSeerRunPullRequestandSeerAgentRun; Night Shift links areSET_NULLand survive.The
getsentry-incinerator-seer-runsCronJob ships separately in the ops repo.Test plan
pytest tests/sentry/runner/commands/test_cleanup.py