Skip to content

Resolve memory allocation failure when cloning repos with LFS objects bigger than available RAM

Tomasz Maczukin requested to merge 3366-temporary-fix-for-lfs-clone-failure into master

What does this MR do?

Resolves memory allocation failure when cloning repos with LFS objects bigger than available RAM. It's done by disabling LFS smudge filter when executing the clone/fetch and checkout commands and calling git lfs pull manually (when git-lfs is installed).

Why was this MR needed?

It's a temporary fix for the problem described at #3366 (closed). It would be best to fix git in a way, that it would not buffer downloaded files, but until then, disabling the smudge filter is the best way to go.

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

  1. Please read #3366 (closed) carefully to get an insight on why such approach was chosen.

  2. There is a question about a test repository that we're using in our tests (!1200 (comment 141443302)).

    In short: my proposition is to switch from https://gitlab.com/gitlab-org/gitlab-test to a new repository, much smaller and provided only for GitLab Runner tests, so it will be easier to manage it in the future.

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

Closes #3366 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading