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

fix: pypi installs happening every time #2587

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

tdejager
Copy link
Contributor

@tdejager tdejager commented Nov 28, 2024

Description

So @ruben-arts found out that we were installing the prefix too often, this came in with the uv upgrade that we re-introduced in a previous PR.

So I think some bugginess was introduced to fix some lifetime issues, basically from what I was reading it was just installing even though the distributions were already installed.

I've did a long-standing refactor that I wanted to do, that you actually get a reason why a reinstall is happening, which is often tricky to debug.

I've also fixed the bug, cleaned up a lot of the debug statements so they make actual sense and report a lot more in general. Also, because of the new structure we can more directly tell why a reinstall happened because of keeping track of this as a a cause.

Tested

I've tested the following manual steps on rerun.io pixi toml:

  • Install and re-install
  • Clean and install
  • Change an installer name in the prefix (to see if the log is triggered)
  • Manually change a version in the prefix (to see if the debug log is triggered)

I would like to add a automated test to stop a similar regression from happening:

  • Automated test

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Thanks for this much needed improvement and fix!

Merging with the assumption the improved tests are coming soon!

@ruben-arts ruben-arts merged commit b267ecb into prefix-dev:main Nov 28, 2024
40 checks passed
jjjermiah pushed a commit to jjjermiah/pixi that referenced this pull request Nov 30, 2024
## Description

So @ruben-arts found out that we were installing the prefix too often,
this came in with the uv upgrade that we re-introduced in a previous PR.

So I think some bugginess was introduced to fix some lifetime issues,
basically from what I was reading it was just installing even though the
distributions were already installed.

I've did a long-standing refactor that I wanted to do, that you actually
get a reason why a reinstall is happening, which is often tricky to
debug.

I've also fixed the bug, cleaned up a lot of the debug statements so
they make actual sense and report a lot more in general. Also, because
of the new structure we can more directly tell why a reinstall happened
because of keeping track of this as a a cause.

## Tested

I've tested the following manual steps on rerun.io pixi toml:
- [x] Install and re-install
- [x] Clean and install
- [x] Change an installer name in the prefix (to see if the log is
triggered)
- [x] Manually change a version in the prefix (to see if the debug log
is triggered)

I would like to add a automated test to stop a similar regression from
happening:
- [ ] Automated test
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.

2 participants