RPC service to list a subset of refs by name
Ci::Pipeline#latest?
is making a Gitaly call to find the latest commit for a git_ref
:
def latest?
return false unless git_ref && commit.present?
project.commit(git_ref) == commit
end
!1365 (merged) was supposed to help us reduce the number of RPC calls by batching the requests into a single one, but the response doesn't include any ref
information, so we don't know how to match the returned commits with the refs.
gitlab#19697 (comment 324284522) proposes a new RefService RPC to get a list of refs by name and each returning ref should have a commit ID.
We already have Gitaly::FindAllBranchesRequest
and Gitaly::FindAllTagNamesRequest
but they return data for all refs from a project.