-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support git LFS #6842
Comments
For this we would need to make the renovate git layer git-lfs aware. |
@oschwald Can you prepare a minimal public reproduction repo? So we have something to test against it. |
Thanks. I made an example repo at https://github.com/oschwald/renovate-lfs-issue. With this repo, the exact failure is:
|
This comment has been minimized.
This comment has been minimized.
I think this needs a new repo config options to configure files (minimatch / wildcard) to checkout with git lfs. |
Thank you for providing a reproduction! 🎉 🚀 The Renovate team will take a look at the reproduction repository. Once we confirm the provided repository reproduces the problem, the label will be changed to |
git lfs uses a pre-push git hook, which is disabled by renovate using |
Hi friends, What would it take to get git lfs pull support over the finish line? Can we contribute anything to help? This is the one feature preventing us from using renovate, and like many others we are on yarn 2 with the yarn binary stored in lfs. Unfortunately, dependabot doesn’t support yarn 2, and renovate doesn’t support git lfs, so we’re in a bit of a rock and hard place. |
Hi @rarkins – any chance you can comment on the above? 💕 |
@fgblomqvist @viceice could either of you summarize the current status? |
We still need to define if it will be always enabled? That way i assume it will always automatically checkout all lfs files. So we don't like to have that. I think we need to add lfs install to buildpack without full enable it. So install binaries only. Then we need a configurable list of lfs files, which renovate should checkout from / commit to branch. |
Does anyone need this feature for anything other than yarn 2? I think it would be sufficient for 99% of users to checkout a default list of files, e.g. If anyone arrives after that with a request for different files, then it could be made configurable (or just add to the lfs checkout list). I haven't heard any use case for making it configurable yet, but many people (like me) are stuck because of yarn 2. |
Instead of fully disabling git lfs by default i like to now some common I plan to make those settings user configurable. |
Sounds great - looking forward to it! |
Any thoughts on pushing this forward, I host documentation with my source code as such I have some jpegs and the like stored in git-lfs, this is breaking golang dependencies because the hashes don't match. In my experience supporting git-lfs is fairly trivial. Thanks all! |
I've lost track of what the next steps are |
we don't support it because we blocked git hooks for security reasons. if you self-host, then you can configure to allow hooks and you need to install git-lfs here's how to do in official renovate images: |
@viceice so is this something that's not going to be supported in the hosted version? |
this was a starter to fully support lfs by renovate. feel free to take and complete it 🤗 |
Not in the foreseeable future for security reasons |
probably yes, until someone finds a way without git hooks. |
Thanks @rarkins and @viceice -- I'm pretty familiar with git-lfs but I went and did a bit of reading. You said not going to be allowed due to If we were to install I've checked my configuration, and I'm looking at some additional things right now but I can't find any use of hooks or reference to hooks. Am I missing something? |
it's using hooks somewhere to push the lfs files, see comments above. that's why you can allow hooks for self-host |
@viceice ah, that's the missing link, for pushing, I see a post-checkout too (now that I'm looking a bit deeper), wonder if they are used for initial cloning though. What if we supported git-lfs for cloning but not for pushing, make that a limitation. Then for cloning it would work for go mods and others that have hashes of their contents but wouldn't support renovating any files that are actually in git-lfs? Another approach could be to take the direnv.net approach and allow only hooks that meet a specific hash. For example, we could allow the 3 hook files that get created so long as their hash matches. #!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/pre-push'.\n"; exit 2; }
git lfs pre-push "$@" This is the Thoughts? |
What would you like Renovate to be able to do?
Use renovate with files stored in git lfs.
We use Yarn's offline-mirror feature to vendor the packages. The vendored packages are stored in Git using LFS. When Renovate tries to push the changes, it fails with the message below.
Relevant debug logs
Slightly sanitized error message.
The text was updated successfully, but these errors were encountered: