dabla opened a new issue, #71891:
URL: https://github.com/apache/airflow/issues/71891
### Under which category would you file this issue?
Task SDK
### Apache Airflow version
3.3.1
### What happened and how to reproduce it?
A `DeadlockImminentError` is raised in Airflow 3.3.1 when a connection is
resolved inside an async task via `await BaseHook.aget_hook(...)` or `await
BaseHook.aget_connection(...)`.
The call chain when fetching a connection inside an async task is:
```
await Connection.async_get() ← async, running on the event-loop thread
→ Connection.get_uri() ← sync, still on event-loop thread
→ self.extra_dejson ← sync property, still on event-loop thread
→ mask_secret()
→ comms.send() ← ERROR: DeadlockImminentError
```
The error message says *"use the async equivalents"* — but the caller
already is.
The bug is inside `Connection` itself: `get_uri()` and `extra_dejson` have
no async counterparts, so secret masking always goes through the blocking
`comms.send()`. `amask_secret()` (which uses `asend()`) already existed in
`airflow.sdk.log` but nothing in `Connection` called it.
### What you think should happen instead?
The `Hook` or `Connection` should be resolved an no DeadlockImminentError
should be raised.
### Operating System
Ubuntu
### Deployment
Official Apache Airflow Helm Chart
### Apache Airflow Provider(s)
_No response_
### Versions of Apache Airflow Providers
_No response_
### Official Helm Chart version
1.22.0 (latest released)
### Kubernetes Version
_No response_
### Helm Chart configuration
_No response_
### Docker Image customizations
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]