Fix timeouts on test webhooks
The Issues, Merge Requests and Notes test webhooks were susceptible to timeouts due to the oldest records being selected to be in the test webhook payload. Indexes on these tables seem to favour sorting newest to oldest, the difference between selecting the oldest Issue, Merge Request, or Note vs the newest for `gitlab-org/gitlab` is ~ 25 seconds (or sometimes more) on `#database-lab` (which is slower than production, but indicative) vs ~10 milliseconds when selecting the newest records. Finders are now used for all scoping to make the scoping even safer. https://gitlab.com/gitlab-org/gitlab/-/issues/290116
Showing
Please register or sign in to comment