ashb commented on a change in pull request #12530:
URL: https://github.com/apache/airflow/pull/12530#discussion_r529380391
##########
File path: tests/serialization/test_dag_serialization.py
##########
@@ -448,6 +447,12 @@ def test_deserialization_start_date(self, dag_start_date,
task_start_date, expec
simple_task = dag.task_dict["simple_task"]
self.assertEqual(simple_task.start_date, expected_task_start_date)
+ def test_deserialization_with_dag_context(self):
+ with DAG(dag_id='simple_dag', start_date=datetime(2019, 8, 1,
tzinfo=timezone.utc)) as dag:
Review comment:
Was my suggestion here not valid then @houqp, given you said:
> Depends on how you use the context manager. with DAG(): works as expected,
but we have huge DAGs (> 9K loc) in production that would be a lot easier to
maintain without that extra indentation introduced with the with block. So we
are using DagContext.push_context_managed_dag(dag) directly in the DAG
definition. This is what triggered the crash.
I.e. does this actually test the code you need it to?
----------------------------------------------------------------
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]