Endless sensor rescheduling if the first sensor run failed to be saved in DB #45050
Open
2 tasks done
Labels
area:core
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.10.3
What happened?
Endless sensor rescheduling happening in
reschedule
mode if the first sensor run failed to be saved in DB.task_reschedule
table:task_reschedule
table for thetry_number == 1
condition the code here returns no data:What you think should happen instead?
In that case we should try to find the first available
task_reschedule
record after the initially needed try number, it can be done easily by modifying condition from:to:
Thanks to sorting
order_by(TaskReschedule.id.asc())
and limtlimit(1)
statements we would select the first record for a try next to initially needed.If there are no records at all, we would get
timezone.utcnow()
by already implemented logicHow to reproduce
Fail the first try of a sensor and delete the records in the
task_reschedule
table for the first try groupOperating System
Airflow official docker apache/airflow:2.9.3-python3.8: Debian GNU/Linux 12 (bookworm)
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: