dstandish commented on code in PR #39336:
URL: https://github.com/apache/airflow/pull/39336#discussion_r1594723182
##########
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:
to be clear i _also_ thought it should work with positive check on up for...
i.e.`where not state = 'up_for_reschedule'` but it did not work. i don't
recall if maybe sqlalchemy was just being too "helpful" or what.
snowflake has `equal_null` function that handles this case. alas we don't
run on snowflake 🤷
--
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]