-
-
Notifications
You must be signed in to change notification settings - Fork 40
fix: Support for Airflow 3.1 #168
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
Conversation
a52c324 to
c6b9dca
Compare
dfb80b7 to
ff59c96
Compare
897d228 to
a578b2f
Compare
| dependencies = [ | ||
| "apache-airflow>=2.8", | ||
| "apache-airflow>=2.8,<4.0; python_version<'3.12'", | ||
| "apache-airflow>=3.0,<4.0; python_version>='3.12' and python_version<'3.13'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomasfarias Hi! I'm a little confused by this change.
Is there any reason why you specified 3.0 as the minimum version for Python 3.12?
According to the Airflow changelog, support for Python 3.12 was added starting with version 2.9.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I jumped ahead to the next version in our tests: We had 2.8, 3.0, and 3.1. So, I just jumped ahead to 3.0.
We could update the minimum version of Airflow to 2.9 for Python 3.12. It's not covered by our tests, but I think it should be relatively safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I'll try to get everything released soon. I've been travelling this week so releases are a bit delayed.
Closes: #166
Adds support for Airflow version 3.1 and later.
This new version of Airflow introduced a lot of changes to module import paths: Classes like
DAGnow come fromairflow.sdk. Moreover, some XCOM methods have been removed from operator classes. They are now available only in theTaskInstance.Moreover, and more painfully, our test suite broke with 3.1. This required a long and painful process to track which fixtures we need for things to work again.
Changes:
xcom_pushmethod to use theTaskInstancein newer versions of Airflow.