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: Use the right channels when upgrading global packages #1326

Merged
merged 4 commits into from
May 19, 2024

Conversation

olivier-lacroix
Copy link
Contributor

Fixes #1318

@olivier-lacroix olivier-lacroix changed the title Fix: Use the right channels when upgrading global packages fix: Use the right channels when upgrading global packages May 6, 2024
@wolfv
Copy link
Member

wolfv commented May 6, 2024

I actually think we should store the initial request in the environment - requested platform and channel.

In the future we migth store more (like inject'ed packages etc.).

@olivier-lacroix
Copy link
Contributor Author

@wolfv is there a specific method to do that?

@wolfv
Copy link
Member

wolfv commented May 6, 2024

Not yet I believe. My idea was to store a little JSON file in the conda-meta/ folder (or another format), that would contain this meta information. (it should not have a .json file ending though because we currently try to parse all files in that folder that end wtih json as PrefixRecords).

@olivier-lacroix
Copy link
Contributor Author

Ok @wolfv . Let me see about that.

@olivier-lacroix olivier-lacroix marked this pull request as ready for review May 19, 2024 05:05
@olivier-lacroix
Copy link
Contributor Author

@wolfv , I think the question of storing data in a file for global packages is broader than this PR. So I prefer to not get into that rabbit hole here.

@pavelzw any chance you could check this indeed resolves #1318 ?

I made a number of steps parallel. It does not seem to have a meaningful impact in terms of speed, so happy to either leave it as is, or revert to a simpler, non-parallel upgrade function.

@pavelzw
Copy link
Contributor

pavelzw commented May 19, 2024

Just checked, #1318 was already fixed by #1324 and works with pixi 0.21.0 already 😅 But I also checked with this PR and it still works with this PR as well.

// Fetch sparse repodata across all channels
let all_channels = channels.values().chain(channel_cli.iter()).unique();
let (client, repodata) =
get_client_and_sparse_repodata(all_channels, *platform, &config).await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this hasn't changed, but I just noticed if you installed a package from a channel that isn't available anymore, this fails. And it doesn't update any environment.

Might be nice to filter these and just list which where skipped in the end.

I'm not avoiding this to merge because of it but just picking your brain.

The case for me was that I installed a locally build package which I had push to /tmp and installed from there.

@ruben-arts ruben-arts merged commit 95176bc into prefix-dev:main May 19, 2024
23 of 24 checks passed
@olivier-lacroix olivier-lacroix deleted the refactorupgrade branch May 20, 2024 11:01
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.

pixi global upgrade only takes a single channel into account
4 participants