Fix N+1 in runner jobs API
What does this MR do and why?
Adds preloads to prevent N+1 database and Gitaly calls.
This endpoint was showing up in #mech_symp_alerts
. URL to logs here (internal)
We can see from the logs that these slow requests execute ~700 SQL queries and ~40 Gitaly calls
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Heinrich Lee Yu