uranusjr commented on a change in pull request #19672:
URL: https://github.com/apache/airflow/pull/19672#discussion_r753898435



##########
File path: tests/api_connexion/endpoints/test_log_endpoint.py
##########
@@ -81,6 +81,18 @@ def setup_attrs(self, configured_app, configure_loggers, 
dag_maker, session) ->
 
         configured_app.dag_bag.bag_dag(dag, root_dag=dag)
 
+        with dag_maker(
+            f'{self.DAG_ID}_copy', 
start_date=timezone.parse(self.default_time), session=session
+        ) as dummy_dag:
+            DummyOperator(task_id=self.TASK_ID)

Review comment:
       So the DAG is initialised so that we can be sure tests in the class can 
correctly pick up the correct logs? That makes sense to me, but it’d be best to 
add a comment describing why this is needed. Otherwise someone might ends up 
accidentally removing this as “unneeded code” in the future.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to