Explicitly destroy webhooks and logs before the project deletion
Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/26259 **Problem** There are foreign keys with DELETE CASCADE option defined for `web_hooks` and `web_hook_logs` tables. Database tries to delete them in the scope of delete project query. For some cases, the query duration exceeds the statement_timeout setting. As the result, the project is stuck in a half-deleted state. **Solution** Run WebHooks::DestroyService before `project.destroy` call and ensure that we delete webhooks efficiently in batches.
Showing
Please register or sign in to comment