Impossible to push an app through git while tracking files with git LFS

Hello,

First I’d like to state that balenaCloud is a really a wonderful tool, a true game changer; I am adapting the dev pipeline in my company in order to use it, and I can’t wait to have that ready for production :slight_smile:

I am facing one issue: I cannot push a repository where git LFS (https://git-lfs.github.com/) is used to track some files in order to update my app.

I first had a warning about the LFS locking API not being supported by the remote, hence I issued, as per the error message, a git config lfs.https://git.balena-cloud.com/user_xxx/repo_xxx.git/info/lfs.locksverify false. But then when I push to balena’s remote I get an error “batch request: unexpected end of JSON input”. I can push my repo if I disable the LFS pre-hook by adding the “–no-verify” flag to git push, but then when my app get deployed, as expected, the content of the files tracked by LFS only contains pointers, not the actual data (in the Dockerfile I copy part of the repo to the final image).

Note that pushing the app using the CLI does work, but within my team it will not always be an option to rely on balena CLI for such operation.

I did not see any mention of LFS here nor in the docs, hence I suspect that this use-case is not supported at all. If there is no way to host LFS files on balena’s git server maybe you could provide an option to point to another server, from which balenaCloud would fetch the LFS files? (I think this is how it is done on Heroku for example).

Am I missing something or is this too much of a limit use-case?

Hi there, we are very glad to hear you are finding the tooling useful. Unfortunately our git implementation is fairly rudimentary and doesn’t support GitLFS extension. We have no plans to support it either, since we consider our git workflow grandfathered and generally recommend users to move to balena-cli workflow. In any case, have you considered AWS/S3 with versioning to achieve the same result?

Thanks for the quick answer! Sticking with git is a way to reduce the number of third-party services and credentials involved to handle our data, however I understand the situation, and I will try to see how I could best work around that.

Maybe you could document explicitly somewhere that git LFS is not supported, I bet the information could be handy for some!