Reduce SQL calls for loading CI artifacts
This eliminates about 23 SQL calls to retrieve job artifacts for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29725
by loading the latest report entries into memory in
MergeRequestsController#show
. Before we were making 22 separate calls for JobArtifact
; now we only need 1.
Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/63228
Edited by Stan Hu