Skip to content

feat(workflows) Add WorkflowFireHistory to the bulk cleanup task#111268

Merged
kcons merged 3 commits into
masterfrom
kcons/cleanups1
Mar 30, 2026
Merged

feat(workflows) Add WorkflowFireHistory to the bulk cleanup task#111268
kcons merged 3 commits into
masterfrom
kcons/cleanups1

Conversation

@kcons
Copy link
Copy Markdown
Member

@kcons kcons commented Mar 21, 2026

WorkflowFireHistory doesn't have any children, so we can do simple query-based deletion.
It has an index on date_added now, so this should be relatively efficient. 10k at a time might not be enough to make a dent, but we can run a one-time cleanup to help if we wish.

It isn't yet listed explicitly in the task config, so this is a no-op.

@kcons kcons requested a review from a team March 21, 2026 00:20
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 21, 2026
Comment thread src/sentry/runner/commands/cleanup.py
Copy link
Copy Markdown
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - should we run a script to try and cleanup a batch of them to make sure we don't cause any issues the first time this executes? (might be just giving a heads up to SRE / folks who are monitoring too)

@kcons
Copy link
Copy Markdown
Member Author

kcons commented Mar 23, 2026

lgtm - should we run a script to try and cleanup a batch of them to make sure we don't cause any issues the first time this executes? (might be just giving a heads up to SRE / folks who are monitoring too)

Yes, I think we need to pay down our debt before we get onto this hourly installments plan. Looks like this task tries to fully clean up, but.. I don't think we want to ask it to do that.

@kcons
Copy link
Copy Markdown
Member Author

kcons commented Mar 23, 2026

https://github.com/getsentry/getsentry/pull/19645 adds a job we should run over a hundred million rows or so before we enable the behavior in this PR. Though, this PR is still gated by WorkflowFireHistory being named in the model param, so it should be safe to merge it before we've run that job as much as we should.

@kcons kcons enabled auto-merge (squash) March 30, 2026 16:42
@kcons kcons merged commit a6213c8 into master Mar 30, 2026
65 checks passed
@kcons kcons deleted the kcons/cleanups1 branch March 30, 2026 17:04
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants