-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Starting with 0.2.6+ uv lowest-direct
does not respect all limits that are specified conditionally
#4136
Comments
cc: @notatallshaw you might be interested in that one. |
The new openai release adds new required parameter `parallel_tool_calls` and our mock did not have it. Bumping version and adding the parameter should solve the problem. It turned out also that uv==0.2.6 introduced a bug for lowest-direct resolution, so we need to limit it to 0.2.5. Details in astral-sh/uv#4136
Thanks, will take a look. |
For now we limit uv to == 0.2.5 (and it indeed fixed the problems we had when uv was 0.2.9 in our CI) - so nothing super-urgent. Happy to test it once there is a candidate with a fix. |
The new openai release adds new required parameter `parallel_tool_calls` and our mock did not have it. Bumping version and adding the parameter should solve the problem. It turned out also that uv==0.2.6 introduced a bug for lowest-direct resolution, so we need to limit it to 0.2.5. Details in astral-sh/uv#4136
Thank you @potiuk :) |
I actually suspect I may have fixed this already. Need to figure out how to test. |
I see the problem but not sure how to fix it yet. |
The solver actually gets to the right solution. It's the pre-fetch that fails. It's very complex... We hit:
And then we attempt to prefetch pandas:
And because it's a direct dependency, we choose the lowest-compatible version. At this point, we know that |
I know one way to fix this (add non-marker versions eagerly), but it will make #4125 harder. So I need to look at these holistically. |
There are also easier things we can do in the interim, like: avoid pre-fetching unbounded dependencies. |
## Summary I think we should be able to model PubGrub such that this isn't necessary (at least for the case described in the issue), but for now, let's just avoid attempting to build very old distributions in prefetching. Closes #4136.
Confirmed: |
We can now remove the 0.2.5 limit on uv after the issue we opened astral-sh/uv#4136 has been addressed in 0.2.10
We can now remove the 0.2.5 limit on uv after the issue we opened astral-sh/uv#4136 has been addressed in 0.2.10
The new openai release adds new required parameter `parallel_tool_calls` and our mock did not have it. Bumping version and adding the parameter should solve the problem. It turned out also that uv==0.2.6 introduced a bug for lowest-direct resolution, so we need to limit it to 0.2.5. Details in astral-sh/uv#4136 (cherry picked from commit 65dbf86)
We can now remove the 0.2.5 limit on uv after the issue we opened astral-sh/uv#4136 has been addressed in 0.2.10 (cherry picked from commit 7c4ea23)
The new openai release adds new required parameter `parallel_tool_calls` and our mock did not have it. Bumping version and adding the parameter should solve the problem. It turned out also that uv==0.2.6 introduced a bug for lowest-direct resolution, so we need to limit it to 0.2.5. Details in astral-sh/uv#4136 (cherry picked from commit 65dbf86)
We can now remove the 0.2.5 limit on uv after the issue we opened astral-sh/uv#4136 has been addressed in 0.2.10 (cherry picked from commit 7c4ea23)
The new openai release adds new required parameter `parallel_tool_calls` and our mock did not have it. Bumping version and adding the parameter should solve the problem. It turned out also that uv==0.2.6 introduced a bug for lowest-direct resolution, so we need to limit it to 0.2.5. Details in astral-sh/uv#4136
We can now remove the 0.2.5 limit on uv after the issue we opened astral-sh/uv#4136 has been addressed in 0.2.10
The new openai release adds new required parameter `parallel_tool_calls` and our mock did not have it. Bumping version and adding the parameter should solve the problem. It turned out also that uv==0.2.6 introduced a bug for lowest-direct resolution, so we need to limit it to 0.2.5. Details in astral-sh/uv#4136 (cherry picked from commit 65dbf86f72ed7be779e7dadd8e8e57c1216c7c07) GitOrigin-RevId: 07322d8d8e41adb117a3359763a9c21741e599c0
We can now remove the 0.2.5 limit on uv after the issue we opened astral-sh/uv#4136 has been addressed in 0.2.10 (cherry picked from commit 7c4ea23b4d5aa4fd757c0c3caef358d4cab486e9) GitOrigin-RevId: 09d2c338c7f168d52e55a89ab5fc814c3a1bf60a
The new openai release adds new required parameter `parallel_tool_calls` and our mock did not have it. Bumping version and adding the parameter should solve the problem. It turned out also that uv==0.2.6 introduced a bug for lowest-direct resolution, so we need to limit it to 0.2.5. Details in astral-sh/uv#4136 GitOrigin-RevId: 65dbf86f72ed7be779e7dadd8e8e57c1216c7c07
We can now remove the 0.2.5 limit on uv after the issue we opened astral-sh/uv#4136 has been addressed in 0.2.10 GitOrigin-RevId: 7c4ea23b4d5aa4fd757c0c3caef358d4cab486e9
As of recently, we are using uv to generate lowest-direct dependencies in airflow. We do it at scale (we generate separate lowest-direct dependencies for every provider we have - we have 90 of them. And it works very well, or rather worked very well till 0.2.5. Something changed in 0.2.6 that causes uv to stop respecting at least some limits specified to be installed and attempt to install much lower versions of dependencies than the limits are.
An example of this can be seen here https://github.com/apache/airflow/actions/runs/9417755856/job/25943952035?pr=40110#step:7:43011
Due to amount of logs to be processed by github actions UI, it needs a bit of patience to see it, but generally speaking it boils down to this error (when uv 0.2.6+ is used (same behaviour is with latest 0.2.9 and versions between):
This works perfectly fine
The thing is that it seems that uv
0.2.5
- works correctly. For Python 3.8 it will do this and this is pretty much expected.The problem might be connecte with the way how our (dynamic !) dependencies specify this for google
extra
https://github.com/apache/airflow/blob/main/generated/provider_dependencies.json#L638 - it's dynamically generated from that .json file by our hatch_build.py hook but it boils down to
So - as expected - uv should not even attempt to try to build pandas 0.1 because for Python 3.8 it is >=1.5.3.
It's relatively easy to reproduce using Airflow CI dev tooling/image (due to the nature of our project - 790 dependencies using Breeze dev tooling and CI image built automatically is the easiest way to reproduce the same environment our CI has):
pipx install -e ./dev/breeze
breeze shell
pip install uv==0.2.6
orpip install uv==0.2.5
uv pip install --python /usr/local/bin/python --resolution lowest-direct --upgrade --editable '.[google]'
Something must have changed 0.2.5 -> 0.2.6 to make uv stop respecting some kinds of lower bindings (I suspect the conditional python version might have something to do with it). I also made a small experiment and added (in generated/provider_dependencies.json) additional unconditional limit
pandas>=1.5.3
effectively leading to:This one also fails in 0.2.6+ but with:
That suggests tha indeed the conditional python_version is the one causing uv to do way more backtracking that it should.
The text was updated successfully, but these errors were encountered: