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

Airflow 2.6.1 Constraints Inconsistency prevents custom install of Sphinx #31366

Closed
2 tasks done
jscheffl opened this issue May 17, 2023 · 10 comments · May be fixed by #33156
Closed
2 tasks done

Airflow 2.6.1 Constraints Inconsistency prevents custom install of Sphinx #31366

jscheffl opened this issue May 17, 2023 · 10 comments · May be fixed by #33156
Assignees
Labels

Comments

@jscheffl
Copy link
Contributor

Apache Airflow version

2.6.1

What happened

See also discussion in Slack: https://apache-airflow.slack.com/archives/CCQ7EGB1P/p1684331895556709

We use Airflow based on docker image apache/airflow:2.6.1-python3.8 and build custom PIP packages on-top. Of course following the setup guide we source the constraints 3.8.txt alongside to keep a consistent setup.

With the upgrade to Airflow 2.6.1 we are trying to install Sphinx which is pinned to 5.3.0, this sources the dependency of docutils. Constraints pins this to 0.20. Install of Sphinx fails with a dependency error:

ERROR: Cannot install sphinx==5.3.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    sphinx 5.3.0 depends on docutils<0.20 and >=0.14
    The user requested (constraint) docutils==0.20

How

What you think should happen instead

Pip install of Sphinx should be possible with the standard constraints.

How to reproduce

Run:

  • docker run -it apache/airflow:2.6.1-python3.8 bash
  • pip install sphinx --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.6.1/constraints-3.8.txt"

Operating System

Ubuntu 20.04

Versions of Apache Airflow Providers

Default provider packages

Deployment

Official Apache Airflow Helm Chart

Deployment details

n/a

Anything else

Workaround: Patch docutils down to 0.19 manually in downloaded constraints-3.8.txt
This was the version used in Airflow 2.6.0

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@jscheffl jscheffl added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels May 17, 2023
@potiuk potiuk self-assigned this May 17, 2023
@potiuk
Copy link
Member

potiuk commented May 17, 2023

Thanks - I will have a look at that - that sounds very strange indeed.

@potiuk potiuk removed the needs-triage label for new issues that we didn't triage yet label May 17, 2023
@jscheffl
Copy link
Contributor Author

jscheffl commented May 18, 2023

Currently Sphinx is defined in constraints to 5.3.0, taking a look to changelogs the most recent version 7.0.1 states:

Release 7.0.1 (released May 12, 2023)
Dependencies

Don't know how, just in setup.py I see sphinx>=5.2.0 - is this the point to upgrade?
Ah, but I see in setup.py there is anot about problems of docutils anyway... but was 0.19 in Airflow 2.6.0?

@potiuk
Copy link
Member

potiuk commented May 18, 2023

The problem is sphinx-rtd-theme which is used to build our docs:

sphinx-rtd-theme 1.2.0 has requirement docutils<0.19, but you have docutils 0.20.1.
sphinx-rtd-theme 1.2.0 has requirement sphinx<7,>=1.6, but you have sphinx 7.0.1.

@potiuk
Copy link
Member

potiuk commented May 18, 2023

This is if I try to manually update sphinx to latest. Seems like a number of projects have the same issue readthedocs/sphinx_rtd_theme#1463

@potiuk
Copy link
Member

potiuk commented May 18, 2023

PR seem to be in review (and green) to fix it. Opened 3 weeks ago readthedocs/sphinx_rtd_theme#1464

@potiuk
Copy link
Member

potiuk commented May 18, 2023

Encouraging it is most welcome

@jscheffl
Copy link
Contributor Author

jscheffl commented Jul 9, 2023

Just did a status check, fix in readthedocs/sphinx_rtd_theme#1464 is still not merged :-(
Airflow 2.6.2 though has changed the error message a bit to:

The conflict is caused by:
    sphinx 5.3.0 depends on docutils<0.20 and >=0.14
    The user requested (constraint) docutils==0.20.1

@potiuk
Copy link
Member

potiuk commented Aug 13, 2023

The fix to upgrade sphinx version to 7 is coming in #33156

@potiuk potiuk linked a pull request Aug 13, 2023 that will close this issue
efe-ercetin added a commit to invent-analytics/airflow-constraints that referenced this issue Feb 23, 2024
When we are trying to install Sphinx which is pinned to 5.3.0, we get the following dependency error:

The conflict is caused by:
    sphinx 5.3.0 depends on docutils<0.20 and >=0.14
    The user requested (constraint) docutils==0.20.1

See apache/airflow#31366
Copy link

This issue has been automatically marked as stale because it has been open for 365 days without any activity. There has been several Airflow releases since last activity on this issue. Kindly asking to recheck the report against latest Airflow version and let us know if the issue is reproducible. The issue will be closed in next 30 days if no further activity occurs from the issue author.

Copy link

This issue has been closed because it has not received response from the issue author.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants