Skip to content

Commit 25fc322

Browse files
committed
fix: replace legacy query syntax
1 parent 20774b8 commit 25fc322

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

airflow-core/tests/unit/models/test_dagrun.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,8 +2296,11 @@ def mapped_print_value(arg):
22962296
# Check if mapped task rerun successfully
22972297
for ti in decision.schedulable_tis:
22982298
dag_maker.run_ti(ti.task_id, dr, map_index=ti.map_index)
2299-
query = select(TI).filter_by(
2300-
dag_id=dr.dag_id, run_id=dr.run_id, task_id="mapped_print_value", state=TaskInstanceState.SUCCESS
2299+
query = select(TI).where(
2300+
TI.dag_id == dr.dag_id,
2301+
TI.run_id == dr.run_id,
2302+
TI.task_id == "mapped_print_value",
2303+
TI.state == TaskInstanceState.SUCCESS,
23012304
)
23022305
success_tis = session.execute(query).all()
23032306
assert len(success_tis) == rerun_length

0 commit comments

Comments
 (0)