Replies: 1 comment
-
Converted it to discussion by mistake, sorry. Re-created the issue in #35644 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Apache Airflow version
2.7.3
What happened
Assume following code runs inside airflow task:
If the Airflow task time out, what happens is that it injects an
AirflowTaskTimeout
exception where the code is currently running now.If the code is designed to capture exceptions, it will capture the timeout and potentially continue running for several hours anyway.
What you think should happen instead
I think it would be better if
AirflowTaskTimeout
was treated similarly toKeyboardInterrupt
, so it need explicitexcept
block to capture.Moving it outside of the
Exception
inheritance tree to inherit directly fromBaseException
would solve that.See https://docs.python.org/3/library/exceptions.html#exception-hierarchy
Timeouts are generally in place to be last resort of aborting process by the higher level system if the lower level code has bugs in it, so it's safer to assume that code that doesn't deal with catching timeout should be aborted.
How to reproduce
See above
Operating System
NA
Versions of Apache Airflow Providers
apache-airflow==2.7.1
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions