Remove need to call gitaly in ProjectPipelineStatus
What does this MR do?
Calling commit
(gitaly) is un-nessary just to obtain the sha, for the
cache key. In fact, the cache key does not need to have the sha as the
sha is part of the cache value. The new cache key should be unique
enough for each project.
In the cached case, this saves us 20 gitaly calls on the dashboard page (assuming we have one full page of projects).
Further information
It appears the cache was changed in gitlab-foss!26473 (merged) to include the commit sha to resolve gitlab-foss#52780 (closed). However, I think it will be better to resolve this another way such as invalidating the cache when the pipeline feature is disabled for the project.
To my pleasant surprise however, the commit status does not show on the dashboard page when I disabled pipelines on a project - as it turns out we have gitlab-foss!25204 (merged) :)
Related issue: #20190 (closed)
Screenshots
-/- | Before | After |
---|---|---|
Un-cached (after redis is restarted) | ||
Cached |
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.