You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding both styles should register the DAG, however only DAG "no_global_dag_registration" does. For the taskflow-style DAG I have to call no_global_dag_registration_taskflow() for it to register.
Maybe doc has not clear description, but it actually mentioned how it work.
Changed in version 2.4: It’s no longer required to “register” the DAG
into a global variable for Airflow to be able to detect the dag if that DAG
is used inside a with block, or if it is the result of a @dag decorated function.
My understanding of differences
# Before Airflow 2.4dag=decorated_function()
# or_=decorated_function()
withDAG(...) asdaaaag:
...
# Since Airflow 2.4decorated_function()
withDAG(...):
...
Apache Airflow version
2.5.0
What happened
TaskFlow
@dag
s don't register without explicitly calling the function that defines it.What you think should happen instead
My understanding is that since Airflow 2.4 DAGs don't require explicit registration as a global object anymore (this is also mentioned in https://airflow.apache.org/docs/apache-airflow/stable/tutorial/taskflow.html#instantiate-a-dag). However, this seems to only be true for the classic style and not for taskflow style DAGs.
How to reproduce
My understanding both styles should register the DAG, however only DAG "no_global_dag_registration" does. For the taskflow-style DAG I have to call
no_global_dag_registration_taskflow()
for it to register.Operating System
varying
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: