We have several Airflow DAGs in Cloud Composer that previously worked fine. The code for the DAGs and Operators has not been changed, but after a recent deployment, we now get this error from the DAGs:
Broken DAG: [...] Relationships can only be set between Operators; received PythonOperator
Again, that DAG has not been changed for several weeks and was previously working fine.
The PythonOperator
there is the PythonOperator provided by Airflow, imported like this:
from airflow.operators.python_operator import PythonOperator
And used in the DAG like this:
OPERATOR_READ_HEADER = PythonOperator(
task_id='read_header',
params={'object_name': 'dependencies/MT940 Header.txt'},
python_callable=read_object,
provide_context=True
)
SENSOR_INPUT_FILE_PROVIDED >> OPERATOR_READ_HEADER
Why would this error have started occurring?
This is on Airflow 1.9.0-composer
in Google Cloud Composer.