Skip to content

Always destroy webhooks synchronously

Alex Kalderimis requested to merge 362149-always-sync-destroy-webhooks into master

What does this MR do and why?

Previously we fell-back to asynchronous batch deletion if there were many logs, but we no longer need to do that now that we do not have a foreign key preventing deletion.

Now we can delete the hook in all cases, and then start a background worker to delete the logs. This is actually unnecessary, since they will be truncated over time anyway, but it is nice to minimize table bloat.

See: #362149

How to set up and validate locally

Create a webhook with over 10k log entries (this may take some time!). Delete it in the web UI, and see that it has been successfully deleted immediately.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports