Adding scope to preload the latest diff commit
What does this MR do and why?
Part of a process to begin preloading merge request commit metadata to avoid possible N+1 queries. This will consist of 5 MRs total, described in the table below.
This MR (with the merge_request_diff_commits_dedup feature flag enabled) will preload merge_request_commit_metadata associations when calling preload_latest_diff_commit is enabled (provided we can find a project id).
| Order | MR/status | Description |
|---|---|---|
| Part 1 |
!203465 (merged) | Adding scope to preload the latest diff commit |
| Part 2a | !204107 (merged) | Add preloading to MergeRequest#recent_commits
|
| Part 2b | !204128 (merged) | Add preloading to MergeRequest#committers (relies on !204107 (merged)) |
| Part 3 | !204132 (merged) | Add preloading to MergeRequestDiff#commit_shas
|
| Part 4 | !204123 (merged) | Add Banzai find_commit_by_sha preloading |
References
https://gitlab.com/gitlab-org/gitlab/-/issues/527235
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Gary Holtz