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

Fix dependencies for celery and opentelemetry for Python 3.8 #33579

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Aug 21, 2023

We used to have problems with pip backtracking when we relaxed
too much open-telemetry dependencies. It turned out that the
backtracting was only happening on Python 3.8 and that it was
ultimately caused by conflict between importlib_metadata between
Airflow and newer versions of opentelemetry (we had <5 for Python
3.8, they had >6 for all versions. The reason for limiting it in
Airflow was Celery that was not working well with importlib 5.

Since Celery 5.3 solved the problems (released 6th of June) we can
now relax the importlib_metadata limit and set Celery to version >=
5.3.0) which nicely resolves the conflict and there is no more
backtracking when trying to install newer versions of opentelemetry
for Python 3.8.

Fixes: #33577


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@potiuk
Copy link
Member Author

potiuk commented Aug 21, 2023

cc: @nathadfield - let's see if that will work.

@potiuk potiuk force-pushed the attempt-to-relax-opentelemetry-pinning branch from 84fcd6e to b56842b Compare August 21, 2023 14:12
@potiuk potiuk requested a review from hussein-awala as a code owner August 21, 2023 14:12
@potiuk potiuk changed the title Relax opentelemetry pinning Fix dependencies for celery and opentelemetry for Python 3.8 Aug 21, 2023
@potiuk
Copy link
Member Author

potiuk commented Aug 21, 2023

OK. Found the reason - see the updated description @ferruzzi -> this one will finally unblock the opentelemetry conflicts and wlll upgrade automatically to latest opentelemetry libraries and will unblock any new features you might want to add (you will now be able to set min-version to whatever you will need.

@potiuk
Copy link
Member Author

potiuk commented Aug 21, 2023

Looks great::

image

@potiuk potiuk requested review from uranusjr and eladkal August 21, 2023 14:28
We used to have problems with `pip` backtracking when we relaxed
too much open-telemetry dependencies. It turned out that the
backtracting was only happening on Python 3.8 and that it was
ultimately caused by conflict between importlib_metadata between
Airflow and newer versions of opentelemetry (we had <5 for Python
3.8, they had >6 for all versions. The reason for limiting it in
Airflow was Celery that was not working well with importlib 5.

Since Celery 5.3 solved the problems (released 6th of June) we can
now relax the importlib_metadata limit and set Celery to version >=
5.3.0) which nicely resolves the conflict and there is no more
backtracking when trying to install newer versions of opentelemetry
for Python 3.8.

Fixes: apache#33577
@potiuk potiuk force-pushed the attempt-to-relax-opentelemetry-pinning branch from b56842b to ae14b02 Compare August 21, 2023 14:43
@potiuk potiuk requested a review from ashb as a code owner August 21, 2023 14:43
@potiuk
Copy link
Member Author

potiuk commented Aug 21, 2023

Just a flaky, unrelated test. Merging @ferruzzi -> otel 1.19 is all yours :)

@potiuk potiuk merged commit ae25a52 into apache:main Aug 21, 2023
1 check passed
@potiuk potiuk deleted the attempt-to-relax-opentelemetry-pinning branch August 21, 2023 15:49
@ferruzzi
Copy link
Contributor

Beautiful! Thanks for remembering that.

@potiuk
Copy link
Member Author

potiuk commented Aug 21, 2023

Beautiful! Thanks for remembering that.

@nathadfield brought it back from under a pile of other things, so thank him :)

potiuk added a commit that referenced this pull request Aug 25, 2023
We used to have problems with `pip` backtracking when we relaxed
too much open-telemetry dependencies. It turned out that the
backtracting was only happening on Python 3.8 and that it was
ultimately caused by conflict between importlib_metadata between
Airflow and newer versions of opentelemetry (we had <5 for Python
3.8, they had >6 for all versions. The reason for limiting it in
Airflow was Celery that was not working well with importlib 5.

Since Celery 5.3 solved the problems (released 6th of June) we can
now relax the importlib_metadata limit and set Celery to version >=
5.3.0) which nicely resolves the conflict and there is no more
backtracking when trying to install newer versions of opentelemetry
for Python 3.8.

Fixes: #33577
(cherry picked from commit ae25a52)
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Airflow 2.7 is incompatible with SodaCore versions 3.0.24 and beyond
4 participants