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

When using --no-sources it seems that uv still reads some metadata from workspace packages #10999

Closed
potiuk opened this issue Jan 27, 2025 · 0 comments · Fixed by #11003
Closed
Assignees
Labels
bug Something isn't working

Comments

@potiuk
Copy link

potiuk commented Jan 27, 2025

Summary

It's related to #10991 - I found it after I tried to make Airlfow workspaces tick.

The problem is that even if --no-sources correctly uses actually released packaged in pypi instead of locally installed packages, some metadata still leaks to the uv pip install command,

In airflow: we have

[tool.uv.sources]
apache-airflow-providers-openlineage = { workspace = true }

However I wanted to use local project to install airflow (non-editable) from sources and specific version of the openlineage provider from pypi (2.0.0).

Our provider in PyPI is released (version 2.0.0):

https://pypi.org/project/apache-airflow-providers-openlineage/2.0.0/

One of it's required dependencies is apache-airflow-providers-common-compat>=1.3.0

In our repo however, in the workspace package we already made the provider dependds on apache-airflow-providers-common-compat>=1.4.0 - in preparation for the upcoming release. We do not yet whether it is going to be openlineage provider 2.1.0 or 3.0.0 - depending whether it will have some breaking changes, but we already know that it needs common.compat >= 1.4.0. So while common.compat>=1.4.0 is already updated, the pyproject.toml of the provider stil has 2.0.0 version set - it will be bumped by the release manager at the release time:

https://github.com/apache/airflow/blob/f6b05fe243c17ffb80a4d2497fa7849f27ea507e/providers/openlineage/pyproject.toml#L60

The problem is that this common.compat >= 1.4.0 and possibly other metadata leaks from the local workspace when --no-sources is used.

Running command:

uv pip install --system --no-sources '.[all-core]' --resolution highest \
 apache-airflow-providers-openlineage==2.0.0 \
 apache-airflow-providers-common-compat==1.3.0  [SOME MORE PROIVDERS]

I get this error:

Using Python 3.9.21 environment at: /usr/local
   Built apache-airflow @ file:///opt/airflow
  × No solution found when resolving dependencies:
  ╰─▶ Because apache-airflow-providers-openlineage==2.0.0 depends on apache-airflow-providers-common-compat>=1.4.0 and you require apache-airflow-providers-common-compat==1.3.0, we can conclude that your requirements and apache-airflow-providers-openlineage==2.0.0 are incompatible.
      And because you require apache-airflow-providers-openlineage==2.0.0, we can conclude that your requirements are unsatisfiable.```

Seems like the common-compat>=1.4.0 comes from local workspace version of the package and not from PyPI 2.0.0 version.

Platform

Ubuntu 22.04

Version

0.5.24

Python version

3.9.21

@potiuk potiuk added the bug Something isn't working label Jan 27, 2025
@konstin konstin self-assigned this Jan 27, 2025
konstin added a commit that referenced this issue Jan 27, 2025
Don't discover workspace members when `--no-sources` is given.

The problem did only occur with `uv pip install`, not with `uv pip compile`.

Fixes #10999
konstin added a commit that referenced this issue Jan 27, 2025
Don't discover workspace members when `--no-sources` is given.

The problem did only occur with `uv pip install`, not with `uv pip compile`.

Fixes #10999
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

Successfully merging a pull request may close this issue.

2 participants