Skip to content

Add information about whether tags were updated to the FetchRemote RPC

Nick Thomas requested to merge add-tags-updated-to-fetch-remote into master

GitLab hinges cache invalidation decisions on whether the FetchRemote call has changed tags or not. Returning this data allows us to optimise that in the common case.

This MR is a rethink of !2739 (closed) , which streams the status-relevant output of the git fetch command to GitLab, for it to make decisions. However, that output turns out to lack information about the SHAs of the changed tags, so we can't optimize the "tags have changed" case very much. All we can reasonably do to check the output to see if any tags have changed, and skip cache invalidation if they haven't. That's implemented in gitlab!49140 (closed)

However, doing it like this seems overly complex and implies significant traffic between Gitaly and GitLab. If Gitaly scans the git fetch output instead, and returns a simple boolean, we can avoid adding a new RPC, and skip a great deal of complexity on both sides. This MR is twinned with this GitLab MR: gitlab!49629 (merged)

Part of gitlab#118683 (closed)

Edited by Nick Thomas

Merge request reports