vatsrahul1001 opened a new pull request, #77866: URL: https://github.com/apache/airflow/pull/77866
When a breakpoint stops a task that dag.test() runs under a pydevd-based debugger (VS Code's debugpy, PyCharm), pydevd suspends every other thread, including the event loop thread the in-process Execution API answers on. Debug Console expressions that call the Execution API, such as xcom_pull or Variable.get, then never return. Airflow 2's dag.test() ran tasks in the calling thread, so these evaluations worked before dag.test() moved to the Task SDK. Only the instance whose callers are in the same process keeps its loop running. The Dag processor's and the triggerer's callers are other processes relayed by the main thread, which a pause stops anyway, and leaving their loop threads traced keeps breakpoints in route code working there. (cherry picked from commit a4a5ae6dc00df805f9d8c1cc35a7aa5f3ca4f582) Co-authored-by: Ephraim Anierobi <[email protected]> --- Clean cherry-pick of the merge commit, no conflicts. **Verified locally:** test_in_process.py, 4 passed; task-sdk test_supervisor.py, 368 passed, 3 failed. The same 3 tests (test_run_simple_dag x2, test_supervise_handles_deferred_task) fail on an unmodified v3-4-test in this environment. Backport of #77297. Generated-by: Claude Code 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
