jedcunningham opened a new pull request #19375: URL: https://github.com/apache/airflow/pull/19375
In `adopt_or_reset_orphaned_tasks`, we set any SchedulerJobs that have failed `scheduler_health_check_threshold` to failed, however a missing condition was allowing that timeout to apply to all jobs, not just SchedulerJobs. This is because polymorphic identity isn't included for `update()`: https://docs.sqlalchemy.org/en/13/orm/query.html#sqlalchemy.orm.query.Query.update So if we had any running LocalTaskJobs that, for whatever reason, aren't heartbeating faster than `scheduler_health_check_threshold`, their state gets set to failed and they subsequently exit with a log line similar to: State of this instance has been externally set to scheduled. Terminating instance. Note that the state it is set to can be different (e.g. queued or up_for_retry) simply depending on how quickly the scheduler has progressed that task_instance again. Closes: #16881 Closes: #16573 Related: https://github.com/apache/airflow/issues/16023#issuecomment-856087959 Might also fix #19277 -- 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]
