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

ResolutionImpossible conflict when installing devel-all on head of main branch using conststraints-main #37560

Closed
1 of 2 tasks
hterik opened this issue Feb 20, 2024 · 8 comments · Fixed by #37573
Closed
1 of 2 tasks
Labels
area:dev-env CI, pre-commit, pylint and other changes that do not change the behavior of the final code kind:bug This is a clearly a bug kind:documentation

Comments

@hterik
Copy link
Contributor

hterik commented Feb 20, 2024

Apache Airflow version

main (development)

If "Other Airflow 2 version" selected, which one?

No response

What happened?

  1. git clone airflow
  2. Create and enter new virtualenv
  3. pip install -e .[devel-all] --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.11.txt
  4. Output:
    ERROR: Cannot install apache-airflow[cncf-kubernetes]==2.9.0.dev0 because these package versions have conflicting dependencies.
    
    The conflict is caused by:
        apache-airflow[cncf-kubernetes] 2.9.0.dev0 depends on kubernetes-asyncio<=29.0.0 and >=28.1.0; extra == "cncf-kubernetes"
        The user requested (constraint) kubernetes-asyncio==24.2.3
  • Looking in pyproject.toml, it requires "kubernetes_asyncio>=28.1.0,<=29.0.0", (It was updated few weeks ago in Kubernetes version bump #37040)
  • Whereas in downloaded constraints-3.11.txt it is pinned as kubernetes-asyncio==24.2.3

There is also a difference in dash vs underscore, don't know if this is significant.

What you think should happen instead?

Constraints listed under https://raw.githubusercontent.com/apache/airflow/constraints-main/ should be compatible with head of main branch.

How to reproduce

see above

Operating System

Ubuntu 23.10

Versions of Apache Airflow Providers

No response

Deployment

Other

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@hterik hterik added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Feb 20, 2024
@hterik
Copy link
Contributor Author

hterik commented Feb 20, 2024

Manually bypassing kubernetes-asyncio shows there are more inconsistencies:

ERROR: Cannot install apache-airflow, jsonschema and openapi-spec-validator because these package versions have conflicting dependencies.

The conflict is caused by:
    jsonschema 4.21.1 depends on referencing>=0.28.4
    jsonschema-specifications 2023.12.1 depends on referencing>=0.31.0
    jsonschema-path 0.3.2 depends on referencing<0.32.0 and >=0.28.0
    The user requested (constraint) referencing==0.33.0

All those versions are currently the same in https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.11.txt,

# This constraints file was automatically generated on 2024-02-20T10:14:41.212613
# via "eager-upgrade" mechanism of PIP. For the "main" branch of Airflow.

jsonschema-path==0.3.2
jsonschema-specifications==2023.12.1
jsonschema==4.21.1
referencing==0.33.0

Reaching this constraints-file should not have been possible.

@Taragolis
Copy link
Contributor

Just wondering where did you find information that you have to use https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.11.txt ?

@hterik
Copy link
Contributor Author

hterik commented Feb 20, 2024

Just wondering where did you find information that you have to use https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.11.txt ?

https://airflow.apache.org/docs/apache-airflow/2.8.1/installation/installing-from-pypi.html#reproducible-airflow-installation

@Taragolis
Copy link
Contributor

Your link about released version of airflow and providers but you tried to install dev version of airflow. For create venv for development we have Local Virtual Environment (virtualenv) instruction.

k8s provider with this changes not released yet, rc3 at this moment, as soon as it released and CI step pass it will be reflected in this constraint file

@hterik
Copy link
Contributor Author

hterik commented Feb 20, 2024

Hi, the link you provided give exactly the same instructions:
https://github.com/apache/airflow/blob/main/contributing-docs/07_local_virtualenv.rst#installing-recommended-version-of-dependencies

pip install -e ".[devel,google]"" \ --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.8.txt"

@Taragolis
Copy link
Contributor

Nice catch! Never scroll down below the hatch instruction since it introduced.

Guess it was some outdated information, need to track all changes in the original file (this one created by splitting previous instruction). That is also section about constraints and extras for development: https://github.com/apache/airflow/blob/main/contributing-docs/12_airflow_dependencies_and_extras.rst

@Taragolis
Copy link
Contributor

I reopen for visibility that it should be changed into the contributors documentation

@Taragolis Taragolis reopened this Feb 20, 2024
@Taragolis Taragolis added area:dev-env CI, pre-commit, pylint and other changes that do not change the behavior of the final code kind:documentation and removed area:core needs-triage label for new issues that we didn't triage yet labels Feb 20, 2024
potiuk added a commit to potiuk/airflow that referenced this issue Feb 20, 2024
The constraints specified for editable build were wrong - editable
builds alswayS use "source-providers" constraints.

Fixes: apache#37560.
@potiuk
Copy link
Member

potiuk commented Feb 20, 2024

PR with fix added.

@hterik - since you are on it - it would be great if you pay close attentiion to those kind of issues in the docs. The docs were recently refactored and ther are likely a number of mistakes, broken links etc. Any simple ones (like broken links) can be fixed immediately - PRs are most welcome, but if you see an issue liike that, it would be great you report it.

potiuk added a commit that referenced this issue Feb 20, 2024
The constraints specified for editable build were wrong - editable
builds alswayS use "source-providers" constraints.

Fixes: #37560.
ephraimbuddy pushed a commit that referenced this issue Mar 6, 2024
The constraints specified for editable build were wrong - editable
builds alswayS use "source-providers" constraints.

Fixes: #37560.
(cherry picked from commit 05ffec4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dev-env CI, pre-commit, pylint and other changes that do not change the behavior of the final code kind:bug This is a clearly a bug kind:documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants