Skip to content

Avoid N+1 on MRs page when metrics merging date cannot be found

What does this MR do?

  • Do not allow reverting a MR when we can't find the merged_at timestamp
  • Make it easier to fetch the merging timestamp for MRs

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Experiencing N+1's when opening merged merge requests which the merged_at timestamp couldn't be found, so we used spend a lot of time fetching notes.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/47613

Merge request reports