ephraimbuddy commented on code in PR #77297:
URL: https://github.com/apache/airflow/pull/77297#discussion_r4626639077


##########
airflow-core/src/airflow/api_fastapi/execution_api/in_process.py:
##########
@@ -148,6 +149,11 @@ def transport(self) -> httpx2.WSGITransport:
         # Own the event loop and thread so the transport controls their 
lifecycle.
         loop = asyncio.new_event_loop()
         thread = threading.Thread(target=loop.run_forever, 
name="InProcessExecutionAPI-loop", daemon=True)
+        if self.serve_while_debugger_paused:
+            # pydevd (debugpy, PyCharm) suspends every other thread at a 
breakpoint, so code paused in
+            # this process could not reach the API. The attribute also stops 
tracing in this thread:
+            # breakpoints in route code don't stop for requests this instance 
serves.
+            thread.pydev_do_not_trace = True  # type: ignore[attr-defined]

Review Comment:
   mypy rejects the assignment due to our config.



-- 
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]

Reply via email to