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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the rev of a pypi dependency causes a git error #1870

Closed
2 tasks done
Mozartenhimer opened this issue Aug 21, 2024 · 1 comment
Closed
2 tasks done

Changing the rev of a pypi dependency causes a git error #1870

Mozartenhimer opened this issue Aug 21, 2024 · 1 comment
Labels
🐞 bug Something isn't working

Comments

@Mozartenhimer
Copy link

Checks

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

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

Reproducible example

Since this involves updating a pixi.toml, I have an original.toml and an updated.toml The only difference is the commit hash.
On version pixi 0.27.1.
repo.sh This script is the operations to reproduce.

set -ex
pixi clean cache --pypi
pixi --version
cp original.toml pixi.toml
pixi install 
rm -f pixi.toml
cp updated.toml pixi.toml
pixi install

orignal.toml

[project]
name = "min-rep"
version = "0.1.0"
channels = [
  "conda-forge",
]


platforms = ["linux-64"]
[dependencies]
python = ">=3.11"

[pypi-dependencies]
requests = { git = "https://github.com/psf/requests.git", rev = "877892e67e22e25bd3cb0dec780bf45c0e67026e" }

updated.toml

[project]
name = "min-rep"
version = "0.1.0"
channels = [
  "conda-forge",
]


platforms = ["linux-64"]
[dependencies]
python = ">=3.11"

[pypi-dependencies]
requests = { git = "https://github.com/psf/requests.git", rev = "a3ce6f007597f14029e6b6f54676c34196aa050e" }

Issue description

When changing the rev of a pypi git project, you get a git error of.

▶ Failed to download and build `requests @ git+https://github.com/psf/requests.git@a3ce6f007597f14029e6b6f54676c34196aa050e`
  ├─▶ Git operation failed
  ╰─▶ process didn't exit successfully: `git reset --hard a3ce6f007597f14029e6b6f54676c34196aa050e` (exit status: 128)
      --- stderr
      fatal: Could not parse object 'a3ce6f007597f14029e6b6f54676c34196aa050e'.
 `

It looks like pixi thinks it's cached, but the commit is not actually cached.

Clearing the cache can work around this problem.

Expected behavior

I expect the environment to install.

@Mozartenhimer Mozartenhimer added the 🐞 bug Something isn't working label Aug 21, 2024
@ruben-arts
Copy link
Contributor

Thanks for the nice reproducer! I could reproduce it with v0.27.1.

This is by luck already fixed in main. Release coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants