Skip to content

Remove need to call gitaly in ProjectPipelineStatus

Thong Kuah requested to merge reduce_pipeline_status_gitaly_call into master

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) Screen_Shot_2020-06-04_at_11.26.02_AM Screen_Shot_2020-06-04_at_11.22.43_AM
Cached Screen_Shot_2020-06-04_at_11.23.55_AM Screen_Shot_2020-06-04_at_11.19.23_AM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Thong Kuah

Merge request reports