Fixed pagination of web hook logs
What does this MR do?
This fixes Projects::HooksController#edit
so web hook logs are paginated using LIMIT/OFFSET, instead of doing this in memory. We also limit the logs to the last two days, just like the documentation says. See the commit message for more details.
Why was this MR needed?
Projects::HooksController#edit
times out for any web hook with a reasonable amount of web hook logs (e.g. all CE web hook "Edit" pages time out). An example of this can be found in Sentry: https://sentry.gitlap.com/gitlab/gitlabcom/issues/227944/
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
End-to-end tests pass ( package-and-qa
manual pipeline job)
Edited by 🤖 GitLab Bot 🤖