ashb commented on a change in pull request #8739:
URL: https://github.com/apache/airflow/pull/8739#discussion_r421844181



##########
File path: tests/jobs/test_scheduler_job.py
##########
@@ -2253,7 +2307,17 @@ def evaluate_dagrun(
             self.null_exec.mock_task_fail(dag_id, tid, ex_date)
 
         try:
-            dag.run(start_date=ex_date, end_date=ex_date, 
executor=self.null_exec, **run_kwargs)
+            # This needs a _REAL_ dag, not the serialized version
+            if not isinstance(dag, SerializedDAG):
+                real_dag = dag
+            else:
+                # It may not be loaded. This "could" live in DagBag, but it's
+                # only really needed here in tests, not in normal code.
+                if dag_id not in self.non_serialized_dagbag.dag_ids:
+                    self.non_serialized_dagbag.process_file(dag.fileloc)
+
+                real_dag = self.non_serialized_dagbag.get_dag(dag_id)

Review comment:
       Probably fixed by https://github.com/apache/airflow/pull/8775




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


Reply via email to