Repository navigation
Task is taking more than 5 minutes to fail #50654
Description
Activity
- addedkind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
on May 15, 2025 - addedpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release
on May 15, 2025 @Lee-W this is happening with a Dag which is trying to use 2 assets with the same name.
I am expecting task to fail fast.It fails immediately on my end. Is there another setup I can try?
- addedCan't ReproduceThe problem cannot be reproducedThe problem cannot be reproducedand removedCan't ReproduceThe problem cannot be reproducedThe problem cannot be reproducedneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
on May 19, 2025 another potential bug found, let's see whether that fixes this issue
Due to the latest task sdk change, this issue occurs in all tasks instead of just the empty operator. The checking logic is totally removed somehow. New root cause found. A total rework needed
We should fix this in TaskRunner by handling the exceptions https://github.com/apache/airflow/blob/main/task-sdk/src/airflow/sdk/execution_time/task_runner.py#L939
After a few more tests, I discovered that my statement was not accurate. The API server as a whole doesn't die. Only the API endpoint itself dies without being correctly handled. It's still the root cause of why the task is hanging. But what we need to do is not handle
finally: but
.airflow/airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py
Line 318 in 22d7ba8
def ti_update_state( The task fails to update it state correctly and hangs there till it fails
Apache Airflow version
main (development)
If "Other Airflow 2 version" selected, which one?
No response
What happened?
When there are 2 assets with same name and there is task which has these 2 assets as outlet then task is taking more than 5 minutes to fail.
What you think should happen instead?
No response
How to reproduce
Run below dag on main latest and notice 'task1' is taking more than 5 minutes to fail
Operating System
Linux
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct