Skip to content

Commit ac0a428

Browse files
hkc-8010eladkal
authored andcommitted
Address review feedback on PR #68012
Fix the CI failures and review comments from PR #68012: - Remove the dead module-level VersionBundle construction in schema/versions/__init__.py that referenced names only imported under TYPE_CHECKING, breaking the lazy cadwyn import on any access to the module and causing NameError in ~30 task-sdk tests. - Remove a duplicated old_ver_client fixture and import block that had been pasted into test_task_instances.py, which triggered mypy no-redef and ruff F811/E402 failures in Static checks. - Use func.min(start_date) instead of ordering by TaskReschedule.id when computing the first reschedule start date, since insertion order does not guarantee chronological order.
1 parent 0988540 commit ac0a428

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,7 @@ def ti_run(
299299
first_task_reschedule_start_date = None
300300
if task_reschedule_count > 0:
301301
first_task_reschedule_start_date = session.scalar(
302-
select(TaskReschedule.start_date)
303-
.where(TaskReschedule.ti_id == task_instance_id)
304-
.order_by(TaskReschedule.id.asc())
305-
.limit(1)
302+
select(func.min(TaskReschedule.start_date)).where(TaskReschedule.ti_id == task_instance_id)
306303
)
307304

308305
dr.team_name = get_team_name_for_ti(task_instance_id, session)

0 commit comments

Comments
 (0)