You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/02 11:49:28 UTC

[GitHub] [airflow] feluelle commented on a diff in pull request #23592: Automatically register DAGs that are used in a context manager

feluelle commented on code in PR #23592:
URL: https://github.com/apache/airflow/pull/23592#discussion_r935467143


##########
newsfragments/23592.significant.rst:
##########
@@ -0,0 +1,24 @@
+DAGS used in a context manager no longer need to be assigned to a module variable
+
+Previously you had do assign a DAG to a module-level variable in order for Airflow to pick it up. For example this

Review Comment:
   ```suggestion
   DAGs used in a context manager no longer need to be assigned to a module variable.
   
   Previously you had to assign a DAG to a module-level variable in order for Airflow to pick it up. For example this
   ```



##########
newsfragments/23592.significant.rst:
##########
@@ -0,0 +1,24 @@
+DAGS used in a context manager no longer need to be assigned to a module variable
+
+Previously you had do assign a DAG to a module-level variable in order for Airflow to pick it up. For example this
+
+.. code-block::
+
+   with DAG(dag_id="example") as dag:
+      ...
+
+can become
+
+.. code-block::
+
+   with DAG(dag_id="example"):
+      ...
+
+
+If you want to disable the behaviour for any reason then set ``auto_register=False`` on the dag::

Review Comment:
   ```suggestion
   If you want to disable the behaviour for any reason then set ``auto_register=False`` on the dag
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org