feat(workflows) Add WorkflowFireHistory to the bulk cleanup task#111268
Conversation
saponifi3d
left a comment
There was a problem hiding this comment.
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. |
|
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. |
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.