ephraimbuddy commented on code in PR #47592:
URL: https://github.com/apache/airflow/pull/47592#discussion_r2120376339


##########
airflow-core/tests/unit/jobs/test_scheduler_job.py:
##########
@@ -5666,6 +5667,13 @@ def side_effect(*args, **kwargs):
                 # Create a Task Instance for the task that is allegedly 
deferred
                 # but past its timeout, and one that is still good.
                 # We don't actually need a linked trigger here; the code 
doesn't check.
+                bundle_name = "testing"
+                orm_dag_bundle = DagBundleModel(name=bundle_name)
+                session.merge(orm_dag_bundle)
+                session.flush()
+                dag_model = DagModel(dag_id=dag.dag_id, 
bundle_name=bundle_name)
+                session.merge(dag_model)
+                session.flush()

Review Comment:
   ```suggestion
   ```
   Why don't `dag.sync_to_db()` do this?



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