Fix timeout_with_traceback crashes on Windows and non-main threads#63664
Fix timeout_with_traceback crashes on Windows and non-main threads#63664Gautam-Bharadwaj wants to merge 3 commits intoapache:mainfrom
Conversation
|
@Gautam-Bharadwaj This PR has a few issues that need to be addressed before it can be reviewed — please see our Pull Request quality criteria. Issues found:
What to do next:
There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. |
e326537 to
331fe27
Compare
|
@potiuk Thanks for the review Jarek! I've rebased the branch and added comprehensive unit tests for
|
f0bb892 to
9bb2812
Compare
9bb2812 to
b2f75c3
Compare
|
Hi @potiuk Sir, Could you please take a look at this PR? If it looks good to you, please feel free to merge it. Thanks in advance! |
The
timeout_with_tracebackcontext manager inairflow.utils.dbusessignal.SIGALRMto raise aTimeoutException.However,
signal.SIGALRMdoes not exist on Windows, causing anAttributeError. Furthermore, even on Unix,signal.signal()can only be called from the main thread, raising aValueErrorinside worker threads. This completely breaks logic wrapped in this context in non-standard environments.I have added safe exception handling around the signal initialization. If
signal.SIGALRMfails due to OS constraints or thread context, it logs a warning and proceeds gracefully as a no-op timeout, instead of crashing the process.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.