Add option to disable git archive caching in workhorse
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?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered
What are the relevant issue numbers?
Edited by Jacob Vosmaer