Turborepo LFS fetch #10446
jakeleventhal
started this conversation in
Ideas
Turborepo LFS fetch
#10446
Replies: 1 comment 5 replies
-
Have you tried using On the Turborepo side, I don't see this being in our scope. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Create a turbo command to intelligently fetch all LFS files that are needed by a turbo project
Non-goals
No response
Background
I have a large monorepo with 12 next apps deploying to Vercel. In my GitHub actions deployment, I am triggering a job for each app to deploy. My monorepo has a number of LFS files (images/videos/etc.).
These files are mostly used by 2-3 of my apps and the other apps don't use LFS files at all. I am accruing a large git LFS bill due to downloading all my LFS files over and over.
Proposal
Implement a turbo command that interfaces with git to find all dependent LFS files needed for a specific turbo script. For example assume I have a turbo script for
deploy
and an app called@myrepo/app1
. I can fetch my repo without LFS files, then use this command to fetch only the files I need from git lfs with something like this:Under the hood this command basically creates a set intersection of all git lfs files and the file dependencies of my turbo task, then uses git lfs to fetch only that intersecting set.
Here is an example of the under the hood logic that seems to grab the correct files as a workaround:
Beta Was this translation helpful? Give feedback.
All reactions