Repository navigation
Better error handling for running ti heartbeats after task is cleared #53140
Copy link
Copy link
Closed
Labels
area:APIAirflow's REST/HTTP APIAirflow's REST/HTTP APIarea:corearea:task-execution-interface-aip72AIP-72: Task Execution Interface (TEI) aka Task SDKAIP-72: Task Execution Interface (TEI) aka Task SDKkind:bugThis is a clearly a bugThis is a clearly a bug
Milestone
Description
Activity
- addedkind:bugThis is a clearly a bugThis is a clearly a bugarea:task-execution-interface-aip72AIP-72: Task Execution Interface (TEI) aka Task SDKAIP-72: Task Execution Interface (TEI) aka Task SDK
on Jul 10, 2025 I will pick this issue up today/tomorrow.
- moved this from Next 2 Weeks to Todo in AIP-72 - Task Execution Interface and SDK
on Aug 8, 2025 11 remaining items
- added a commit that references this issue
on Feb 8, 2026 - moved this from Icebox to In Progress in AIP-72 - Task Execution Interface and SDK
on Feb 12, 2026 - added a commit that references this issue
on Mar 11, 2026 - added a commit that references this issue
on Apr 3, 2026 - added a commit that references this issue
on Apr 3, 2026 - added a commit that references this issue
on Apr 8, 2026 - added 5 commits that reference this issue
on Apr 8, 2026
Metadata
Metadata
Assignees
Labels
area:APIAirflow's REST/HTTP APIAirflow's REST/HTTP APIarea:corearea:task-execution-interface-aip72AIP-72: Task Execution Interface (TEI) aka Task SDKAIP-72: Task Execution Interface (TEI) aka Task SDKkind:bugThis is a clearly a bugThis is a clearly a bug
Apache Airflow version
main (development)
If "Other Airflow 2 version" selected, which one?
No response
What happened?
When a running TI is cleared, it is immediately removed from the ti table and moved to TIH. This causes subsequent heartbeats from the running TI to receive a 404 (Not Found) from the API server.
As a result, the client (worker/task) logs an error like: "TaskInstance not found", while it could be running.
What you think should happen instead?
Instead of a 404, the API should handle this more gracefully by checking TIH when a TI is not found in TI.
How to reproduce
Operating System
MacOS
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