-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix version_compat for Airflow 3.0.X #55447
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
3c97fa5 to
0449002
Compare
The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
0449002 to
3163274
Compare
ashb
left a comment
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.
Doing this based on the Airflow version isn't the right pattern really.
The reason is that the version that is important is actually the TaskSDK version, not the Airflow version, and with 3.1 we are working very hard towards making it possible to use operators etc without the main "apache-airflow-core" dist installed.
|
The PR should add a test that would fail in main without the change. |
OK, is there an existing example of the right way of doing this? This code is reproduced unmodified from the Google Cloud provider version_compat file since I happened to see mention of the same issue in the comments there. |
|
Yeah, we aren't very good about it yet. In this case it's a bit hard I suspect, but this is probably a: but I don't know if that pattern will work here. |
Here the So, I don't think the above would work here. |
Check #52378 (comment) . It include the logic of why 3.0 vs 3.1 specifically for DecoratedOperators |
|
Ideally we should have test for this but since this change is related to the DecoratedOperator in task SDK, I am merging it to unblock and have it released. |
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
…55447) The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. apache#52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required `xcom_push` method in version 3.0.X. This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
The decorated operator for this provide fails with Airflow 3.0.X and provider version > 4.4.0. #52465 updated version_compat and the operator to use the BaseOperator from the Task SDK. However, this operator is missing the required
xcom_pushmethod in version 3.0.X.This causes failures when using the decorater operator with AttributeError: '_DockerDecoratedOperator' object has no attribute 'xcom_push'.
Resolves #53077
Tested locally with DAG below:
^ 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.