Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move pixi.lock to git lfs #189

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Move pixi.lock to git lfs #189

merged 2 commits into from
Jun 27, 2024

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Jun 27, 2024

I've never been fully convinced of the large size of the pixi.lock file directly committed to the git repo. Here below some history of the pixi support and discussions:

After chatting with @flferretti and @traversaro, we decided the following solution to prevent the repo to grow too much in size for the benefit of a very small portion of users:

  • Remove the committed pixi.lock (we cannot do much from the previous large diffs w/o rewriting history, let's learn the lesson for future projects).
  • Use git LFS to allow users to pull the pixi.lock file only if needed.

I believe this is a good trade off that works well for us. We can work on extending the documentation in other PRs.

Warning

For future readers, keep in mind that GitHub limits the bandwidth from/to the LFS server. If you have many users pushing/pulling LFS files and don't have an upgraded account, you may finish your monthly quota. If this is the case, you might need to find other solutions to prevent having the pixi.lock in your repository.

How to test this PR:

# Clone the repository
cd /tmp
export GIT_LFS_SKIP_SMUDGE=1
git clone -b move_pixi_lock_to_git_lfs https://github.com/ami-iit/jaxsim

# Make sure that the pixi.lock is just 3 lines long
cd jaxsim/
cat pixi.lock | wc -l

# Get the actual pixi.lock from LFS
git lfs pull

# Now the pixi.lock should be ~15k lines long (up to today).

馃摎 Documentation preview 馃摎: https://jaxsim--189.org.readthedocs.build//189/

@diegoferigo diegoferigo self-assigned this Jun 27, 2024
@diegoferigo
Copy link
Member Author

Note: I guess that now we can also add back to the pixi.lock the other architectures and variants that were originally part of #134, but then removed because the lock file was excessively large.

Copy link
Collaborator

@flferretti flferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can we update the lockfile before moving it to LFS?

@diegoferigo
Copy link
Member Author

I forgot to comment, this PR already contains an updated lock file.

@traversaro
Copy link
Contributor

Note that as now the diff will be quite obscure (and even before they were not super clear given the size of the lockfile) in the future to update the lockfile we could use something like https://pixi.sh/dev/advanced/updates_github_actions/#how-to-use (without the schedule stuff) that adds in the PR a description of the changes.

@diegoferigo
Copy link
Member Author

Note that as now the diff will be quite obscure (and even before they were not super clear given the size of the lockfile) in the future to update the lockfile we could use something like https://pixi.sh/dev/advanced/updates_github_actions/#how-to-use (without the schedule stuff) that adds in the PR a description of the changes.

This is a good idea. We may need to adapt the example to use git lfs, not a big deal though.

@diegoferigo diegoferigo merged commit 7340d43 into main Jun 27, 2024
29 checks passed
@diegoferigo diegoferigo deleted the move_pixi_lock_to_git_lfs branch June 27, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants