-
Notifications
You must be signed in to change notification settings - Fork 772
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
uv lock is extremely slow with google artifact registry #6104
Comments
Wow, interesting that it was so much faster before! Hmm, ok. We'll likely need to revert then. Is there any chance you could share |
Sure I can share the logs. Do you want me to run the lock to completion, or just for a while and stop |
A run to completion would be great, but it doesn't need to be the entire set of 200 requirements. Just a representative sample would be great. Ideally with |
I ran it for just 1 package (apache-beam[gcs]) and it took almost a minute. |
Thanks. It's such a shame that the registry doesn't support PEP 658 or range requests. I'm amazed by how many commercial registries don't at least support the standard. |
(not a uv dev) In my experience, I've found that apache-beam and many google libraries have the issue of pinning highly specific versions of dependencies, notably it may be worth trying to install your package by forcing a specific version of protobuf. does that get the installation to resolve faster? from the logs:
|
I did do that, basically, I exported my requirment.txt with all the pinned version into pyproject.toml to see if that will limit the resolution but that didn't make a difference. |
Is this materially slower than when you |
Not it is not. Though I am getting a hash mis match error
|
Does your package have an invalid hash? Have you checked what the registry provides vs. the true hash of the distribution? |
Hmm, acutally it is due to the way are setting up google artifact registry We have a Virtual repository that points to a standard repository ( internal packages) and to pypi as a remote repository It seems the virtual repository only provides the distribution ( sha256:d7a10bc5ef5ab08322488bde8c726eeee5c8618723fdb399597ec58f3d82df81) , while the remote repository has both wheel and sdist files. TL;DR Note: Changing the lock process to use the remote-repository doesn't change the lock time. |
Before the merge of PR #5089, using uv lock with Google Artifact Registry was quite efficient. However, post-merge, the locking process for a project with around 200 requirements has drastically slowed down, now taking up to an hour. Additionally, the cache size has escalated to approximately 300 GB, which seems excessive.
As a comparison, reconfiguring the repository to use PyPI reduces the lock time to under 3 minutes without utilizing the cache.
Thank you for looking into this matter. I appreciate your efforts in maintaining and improving this tool.
The text was updated successfully, but these errors were encountered: