[Design Management] Remove requirement for Git LFS

This issue was created from a discussion #212570 (comment 313875193).

Problem

Design Management has a requirement that the project has Git LFS enabled. Git LFS is used to store large files externally from the repository. This reduces the size of the repository. With Git LFS enabled, depending on the instance's configuration design files are either stored locally on disk, or in a cloud service. The file that is committed to the Git repository is a very small LFS Pointer file that allows the server to fetch the actual design file from its actual storage.

We're discovering that this requirement for Git LFS is a hurdle for adoption. It adds an extra step to enabling using Design Management.

Proposal

Drop the requirement for Design Management that a project has Git LFS enabled.

👍 This would make Design Management default to on for users on the right tier, as the remaining requirement would be the license everyone (as Design Management is moving to FOSS).

👎 This will mean an increase in Design Management repository sizes for those projects that do not have Git LFS enabled.

Considerations

We'd need to adjust a couple of places in our backend services:

  • SaveDesignsService Uses Blobs to determine if the design file has changed since the last upload. It is currently written with the assumption that we can fetch a lot of Git Blobs because the Blob#data is very small in size due to being LFS Pointer files. If Blob#data were to sometimes be the full design file, we may need to consider how to determine if the file hasn't changed without loading the data of the design file - possibly we would want to migrate into the Action model a hash of the file in order to check without fetching the full design files (perhaps the same as what is generated for an LFS pointer in Gitlab::Git::LfsPointerFile#sha256).
  • GenerateImageVersionsService Assumes that all files can be found through LfsObjectUploader and therefore be Carrierwave::SanitizedFiles. This class would need to be adjusted to work with files that are not backed by LfsObjectUploader.

Note that SaveDesignsService and our controllers already can work with non-LFS files.

Related issues

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖