saitejabandaru-in opened a new pull request, #72079: URL: https://github.com/apache/airflow/pull/72079
Closes #71891. ### Motivation A `DeadlockImminentError` is raised in Airflow 3 when resolving a connection inside an async task (e.g. via `await BaseHook.aget_hook(...)`). The `Connection.async_get()` method resolves the connection and saves it to `SecretCache`. The cache attempts to save the URI via the synchronous `get_uri()` method, which deserializes `extra` using `extra_dejson`. The `extra_dejson` property iteratively loops over the dict and masks secrets using `mask_secret`, which triggers a synchronous IPC call (`comms.send()`) to the task supervisor. Since this executes inside the asyncio event-loop thread, it throws `DeadlockImminentError` and crashes the loop. ### Changes - Implemented `aextra_dejson` and `aget_uri` on `Connection` to do the same but natively await the existing async masking utility (`amask_secret`). - Updated `_async_get_connection` in the execution environment's context to `await conn.aget_uri()` when saving to the SecretCache. -- 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]
