dstandish commented on code in PR #39336:
URL: https://github.com/apache/airflow/pull/39336#discussion_r1594715786
##########
airflow/jobs/backfill_job_runner.py:
##########
@@ -245,7 +245,16 @@ def _update_counters(self, ti_status: _DagRunTaskStatus,
session: Session) -> No
session.execute(
update(TI)
.where(filter_for_tis)
- .values(state=TaskInstanceState.SCHEDULED)
+ .values(
+ state=TaskInstanceState.SCHEDULED,
+ try_number=case(
+ (
+ or_(TI.state.is_(None), TI.state !=
TaskInstanceState.UP_FOR_RESCHEDULE),
Review Comment:
when it's null, comparisons evaluate to false....
##########
airflow/jobs/backfill_job_runner.py:
##########
@@ -425,6 +434,8 @@ def _task_instances_for_dag_run(
try:
for ti in dag_run.get_task_instances(session=session):
if ti in schedulable_tis:
+ if not ti.state == TaskInstanceState.UP_FOR_RESCHEDULE:
Review Comment:
i think i'm just in sql brain here.....
--
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]