Skip to content

Draft: Speed up pull mirroring by avoiding cache invalidation when no tags have changed

Nick Thomas requested to merge 118683-use-fetch-remote-with-status into master

What does this MR do?

Currently, pull mirroring will fetch the full list of tags for a repository twice - before and after the pull - and use the diff between them to work out which new tags have been added.

Instead, we can parse the git fetch output to learn when tags have been added, and use that to avoid pulling the list of tags twice if no tags have been changed by the fetch.

Ideally, we'd use the output of git fetch to determine exactly which tags had been changed, but that adds significant complexity since the pointed-to SHAs are not included in the output, and we need that for the push events we create, etc. Still, optimising the common case seems like a decent win to me.

Does this MR meet the acceptance criteria?

Conformity

Availability 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

Related to #118683 (closed)

Edited by Nick Thomas

Merge request reports