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 2019/12/02 11:33:05 UTC
[GitHub] [airflow] ashb commented on a change in pull request #6638:
[AIRFLOW-6043] Update dag reference to all tasks in sub_dag
ashb commented on a change in pull request #6638: [AIRFLOW-6043] Update dag reference to all tasks in sub_dag
URL: https://github.com/apache/airflow/pull/6638#discussion_r352547908
##########
File path: tests/models/test_dag.py
##########
@@ -968,3 +968,14 @@ def test_duplicate_task_ids_for_same_task_is_allowed(self):
self.assertEqual(t1, t2)
self.assertEqual(dag.task_dict, {t1.task_id: t1, t3.task_id: t3})
self.assertEqual(dag.task_dict, {t2.task_id: t2, t3.task_id: t3})
+
+ def test_sub_dag_updates_all_references_while_deepcopy(self):
+ with DAG("test_dag", start_date=DEFAULT_DATE) as dag:
+ t1 = DummyOperator(task_id='t1')
+ t2 = DummyOperator(task_id='t2')
+ t3 = DummyOperator(task_id='t3')
+ t1 >> t2
+ t2 >> t3
+
+ sub_dag = dag.sub_dag('t2', include_upstream=True, include_downstream=False)
Review comment:
Does this make sense? This `sub_dag` is an odd beast that is similarly named but subtly different to an _actual_ subdag via the SubDag operator.
When is this code path exercised?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services