amoghrajesh commented on code in PR #51780: URL: https://github.com/apache/airflow/pull/51780#discussion_r2152530163
########## devel-common/src/tests_common/pytest_plugin.py: ########## @@ -1957,13 +1957,19 @@ def override_caplog(request): @pytest.fixture def mock_supervisor_comms(monkeypatch): + import socket + # for back-compat from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS if not AIRFLOW_V_3_0_PLUS: yield None return + # Patch socket(fileno=0) before anything touches CommsDecoder + dummy_sock, _ = socket.socketpair() + monkeypatch.setattr("airflow.sdk.execution_time.comms.socket", lambda fileno: dummy_sock) Review Comment: This is because we have defined a getattr, which will get invoked and disturb the hasattr below. So we set a dummy socket whenever SUPERVISOR_COMMS tries to init -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org