Skip to content

Fix N+1 for commits with pipelines

Dmitry Gruzd requested to merge 227383-fix-commits-search-n-plus-1 into master

What does this MR do?

The Ci::Pipeline data (latest_pipeline) loaded in the CommitPresenter causes N+1. This MR fixes that by using BatchLoader for latest_pipeline.

This is an example search on production that has this N+1 issue.

#227383 (closed)

Screenshots (strongly suggested)

Screenshot_2021-04-13_at_16.46.24

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #227383 (closed)

Edited by Dmitry Gruzd

Merge request reports