kaxil commented on a change in pull request #6950: [AIRFLOW-6392] Remove cyclic dependency baseoperator <-> helpers URL: https://github.com/apache/airflow/pull/6950#discussion_r361993905
########## File path: UPDATING.md ########## @@ -57,6 +57,31 @@ https://developers.google.com/style/inclusive-documentation --> +### Chain and cross_downstream moved from helpers to BaseOperator + +The chain and cross_downstream methods are now moved to airflow.models.baseoperator module from +airflow.utils.helpers module where they belong. + +Helpers module is supposed to contain standalone helper methods that can be imported by all classes. +The `chain` method and `cross_downstream` method both use BaseOperator and if any other package imports +any of the helpers classes it automatically creates an implicit dependency to BaseOperator which +can often lead to cyclic dependencies. + +More infomration in [AIFLOW-6392](https://issues.apache.org/jira/browse/AIRFLOW-6392) + +In Airflow 1.10 you imported those two methods like this: + +```python +from airflow.utils.helpers import chain +from airflow.utils.helpers import cross_downstream +``` + +In Airflow 2.0 it should be changed to: +```python +from airflow.models.baseoperator import chain Review comment: chain and cross_downstream don't belong to BaseOperator. We should not do this to remove cyclic depdendency. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services