jmcarp commented on a change in pull request #5403: [AIRFLOW-4759] Batch 
queries in set_state.
URL: https://github.com/apache/airflow/pull/5403#discussion_r292110178
 
 

 ##########
 File path: airflow/api/common/experimental/mark_tasks.py
 ##########
 @@ -77,12 +88,14 @@ def set_state(task, execution_date, upstream=False, 
downstream=False,
     """
     assert timezone.is_localized(execution_date)
 
-    assert task.dag is not None
-    dag = task.dag
+    task_dags = {task.dag for task in tasks}
+    assert len(task_dags) == 1
 
 Review comment:
   Good catch. There are a few `assert` statements in this file--I'll change 
them all to raise exceptions.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to