pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Smudge errors when installing a package from git

Open lminer opened this issue 1 year ago • 7 comments

Checks

  • [X] I have checked that this issue has not already been reported.

  • [X] I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

NA

Issue description

I'm trying to add a private package that I install directly from github. The install is failing with a git-lfs error. I have no such problems when I try to install either via pip, or when I try to clone the repository. My pyproject.toml has a line something like this:

[tool.pixi.pypi-dependencies]
myrepo = { git = "ssh://[email protected]/foo/myrepo.git" }

The error is this:

├─▶ Failed to download and build `foo @ ssh://[email protected]/foo/myrepo.git@<commit_hash>`
  ├─▶ Git operation failed
  ╰─▶ process didn't exit successfully: `git reset --hard <commit_hash>` (exit status: 128)
      --- stderr
      Downloading foo/<path>/bar.tar.zst (1.4 MB)
      Error downloading object: foo/<path>/bar.tar.zst (<object_hash>): Smudge error: Error downloading foo/<path>/bar.tar.zst (<object_hash>): error transferring
      "<object_hash>": [0] remote missing object <object_hash>

      Errors logged to '<path_to_cache>/git-v0/checkouts/<checkout_id>/<commit_hash>/.git/lfs/logs/<log_file>.log'.
      Use `git lfs logs last` to view the log.
      error: external filter 'git-lfs filter-process' failed
      fatal: foo/<path>/bar.tar.zst: smudge filter lfs failed

Expected behavior

I expect it to successfully install as it does with pip and with conda/mamba.

lminer avatar Sep 06 '24 22:09 lminer

Would it be possible to get a reproducer for this?

tdejager avatar Sep 07 '24 11:09 tdejager

@tdejager Sure. I just got one working. I made a repo that includes another repo in its pypi dependencies: https://github.com/lminer/pixilfsbug. The other repo is at https://github.com/lminer/lfsbug. If you clone pixilfsbug and then run pixi install, you should get the same error as above.

lminer avatar Sep 07 '24 16:09 lminer

Great thank you! Will investigate this next week :)

tdejager avatar Sep 08 '24 06:09 tdejager

Looks like UV is responsible for this issue and it is known: https://github.com/astral-sh/uv/issues/3312

lminer avatar Sep 16 '24 16:09 lminer

Thanks, let's track and update accordingly.

tdejager avatar Sep 17 '24 08:09 tdejager

Hi, I'm having the same issue. Is there any update on this?

xela-95 avatar Sep 30 '24 12:09 xela-95

@xela-95 Not anymore, uv also doesn't seem to have fixed it yet

ruben-arts avatar Sep 30 '24 15:09 ruben-arts