Skip to content

WIP Too many Gitaly calls from dashboard/projects

What does this MR do?

This MR addresses the number of Gitaly calls from the Projects dashboard, reported in #40260 (moved). I have two specs demonstrating the problem.

The first is a controller spec, which seems more appropriate for a request-response-N+1-issue, but the :request_store flag there counts several additional calls. (71)

The second is a narrow spec for ProjectsHelper#load_pipeline_status. This also throws TooManyInvocations, but on a narrower scope and counts fewer calls (40). Also, RequestStore needs to be manually turned on here.

We could keep one or both. I'm considering keeping both while specifically coding to the ProjectsHelper spec, bringing that number from 40 down to 20 (1 call per Project). At that point it should be easier to understand exactly which calls the ProjectsController spec is counting, and decide if that spec would be useful to keep as well.

Does this MR meet the acceptance criteria?

Conformity

Performance 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

Merge request reports