Skip to content

Add option to disable git archive caching in workhorse

Jacob Vosmaer requested to merge option-disable-archive-cache into master

What does this MR do?

Make it possible to disable reading and writing from the Git archive cache in gitlab-workhorse, either via a feature flag or an environment variable.

Note that this flag is ignored by the Sidekiq job that cleans up the archive cache directory. Emptying an empty directory will be very fast so it did not seem worth the effort to me at this time to extend the option to disable that job.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

As discussed in gitlab-com/migration#63 (closed), the way the Git archive cache currently works is problematic for cloud-native deployments of GitLab. There must be an NFS mount shared between all gitlab-workhorse and sidekiq processes.

The option we're adding in this merge request serves two purposes:

  • to allow us to experiment with the consequences of removing the cache altogether
  • to allow us to cloud native prototype deployments, regardless of whether the cache is really needed for production

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Jacob Vosmaer

Merge request reports