pierrejeambrun commented on code in PR #48239:
URL: https://github.com/apache/airflow/pull/48239#discussion_r2014654346


##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -142,8 +143,10 @@ def _get_connection(conn_id: str) -> Connection:
     from airflow.sdk.execution_time.comms import ErrorResponse, GetConnection
     from airflow.sdk.execution_time.task_runner import SUPERVISOR_COMMS
 
-    SUPERVISOR_COMMS.send_request(log=log, msg=GetConnection(conn_id=conn_id))
-    msg = SUPERVISOR_COMMS.get_message()
+    with SUPERVISOR_COMMS.lock:

Review Comment:
   That was a discussion with Ash where we felt it was needed for the different 
Triggers to not use the communication channel at the same time and receive / 
send wrong messages. (because they are all async).
   
   Therefore when a trigger is trying to send/receive something from the 
supervisor, it will block the comms so it does not interfere with other 
triggers.



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