-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add task to delete empty deleted integrations from the database #3941
Conversation
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
|
|||
## Unreleased | |||
|
|||
### Added | |||
|
|||
- Add manually run task to cleanup unused integrations @mderynck ([#3941](https://github.com/grafana/oncall/pull/3941)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if that's have to be a manual task. I'd prefer it to b automatic, otherwise it is not clear who will own it, and we would need to add some docs about that process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to release this task to run manually and then in a follow-up PR connect it to run as part of sync_organization to cover everything. So it will only be manual for a short time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any dangerous on_delete=models.CASCADE
relations. Looks good to me
What this PR does
Add task which will cleanup deleted integrations from the database if they don't have any alert groups. This is to help address an issue where queries are slowing down due to having a large numbers of ids that do not contribute to the result.
This will be connected as part of sync organization task once it tests out ok.
Which issue(s) this PR fixes
Checklist
pr:no public docs
PR label added if not required)CHANGELOG.md
updated (orpr:no changelog
PR label added if not required)