kaxil commented on code in PR #74592:
URL: https://github.com/apache/airflow/pull/74592#discussion_r4250047344
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -3382,7 +3382,7 @@ def _verify_integrity_if_dag_changed(self, dag_run:
DagRun, session: Session) ->
.where(
TI.dag_id == dag_run.dag_id,
TI.run_id == dag_run.run_id,
- TI.state.in_(State.unfinished),
+ or_(TI.state.in_(State.unfinished), TI.state.is_(None)),
Review Comment:
This looks like a regression from #60956, which replaced the Python loop
(`if ti.state in State.unfinished`) with this bulk `UPDATE`. The `in` check
matched `None`; SQL `IN (..., NULL)` never matches a NULL row. So 3.2.0 through
3.3.2 all have it. The `State.unfinished` filter at L3261 and the two in
`taskinstance.py` already OR in `is_(None)`.
--
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]