@@ -2061,21 +2061,23 @@ def test_dags_needing_dagruns_skips_adrq_when_serialized_dag_missing(
20612061 session .add (AssetModel (uri = orphan_uri ))
20622062 session .flush ()
20632063 asset_id = session .scalar (select (AssetModel .id ).where (AssetModel .uri == orphan_uri ))
2064- session .add (
2065- DagModel (
2066- dag_id = orphan_dag_id ,
2067- bundle_name = "testing" ,
2068- max_active_tasks = 1 ,
2069- has_task_concurrency_limits = False ,
2070- max_consecutive_failed_dag_runs = 0 ,
2071- next_dagrun = timezone .datetime (2038 , 1 , 1 ),
2072- next_dagrun_create_after = timezone .datetime (2038 , 1 , 2 ),
2073- is_stale = False ,
2074- has_import_errors = False ,
2075- is_paused = False ,
2076- asset_expression = {"any" : [{"uri" : orphan_uri }]},
2077- )
2064+
2065+ dag_model = DagModel (
2066+ dag_id = orphan_dag_id ,
2067+ bundle_name = "testing" ,
2068+ max_active_tasks = 1 ,
2069+ has_task_concurrency_limits = False ,
2070+ max_consecutive_failed_dag_runs = 0 ,
2071+ next_dagrun = timezone .datetime (2038 , 1 , 1 ),
2072+ next_dagrun_create_after = timezone .datetime (2038 , 1 , 2 ),
2073+ is_stale = False ,
2074+ has_import_errors = False ,
2075+ is_paused = False ,
2076+ asset_expression = {"any" : [{"uri" : orphan_uri }]},
20782077 )
2078+ session .add (dag_model )
2079+ session .flush ()
2080+
20792081 session .add (AssetDagRunQueue (asset_id = asset_id , target_dag_id = orphan_dag_id ))
20802082 session .flush ()
20812083
@@ -2137,6 +2139,12 @@ def test_dags_needing_dagruns_missing_serialized_debug_lists_sorted_dag_ids(
21372139 is_paused = False ,
21382140 asset_expression = {"any" : [{"uri" : "test://ds_ghost_a" }]},
21392141 ),
2142+ ]
2143+ )
2144+ session .flush ()
2145+
2146+ session .add_all (
2147+ [
21402148 AssetDagRunQueue (asset_id = id_z , target_dag_id = "ghost_z" ),
21412149 AssetDagRunQueue (asset_id = id_a , target_dag_id = "ghost_a" ),
21422150 ]
0 commit comments