This is an automated email from the ASF dual-hosted git repository.
kaxil pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2b306ca05a8 Fix secrets backend connection errors silently swallowed
at DEBUG level (#68301)
2b306ca05a8 is described below
commit 2b306ca05a8503eb46577a6bd13f580e67b46a10
Author: Sean Muth <[email protected]>
AuthorDate: Tue Jun 9 14:44:30 2026 -0500
Fix secrets backend connection errors silently swallowed at DEBUG level
(#68301)
When a secrets backend raises during get_connection(), the exception was
caught and logged at DEBUG without exc_info, making the actual error
invisible even with DEBUG logging enabled. This made diagnosing failures
like deserialization errors in custom backends (e.g. Vault returning a
200 but with unexpected payload format) very difficult.
Add exc_info=True to both the sync and async connection lookup loops,
matching the existing behaviour in _get_variable which already uses
log.exception(). The exception remains at DEBUG to avoid log spam in
normal multi-backend setups where fallthrough is expected.
---
task-sdk/src/airflow/sdk/execution_time/context.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/task-sdk/src/airflow/sdk/execution_time/context.py
b/task-sdk/src/airflow/sdk/execution_time/context.py
index fa83ce3a5f5..bbaff215c9b 100644
--- a/task-sdk/src/airflow/sdk/execution_time/context.py
+++ b/task-sdk/src/airflow/sdk/execution_time/context.py
@@ -212,6 +212,7 @@ def _get_connection(conn_id: str) -> Connection:
"Unable to retrieve connection from secrets backend (%s). "
"Checking subsequent secrets backend.",
type(secrets_backend).__name__,
+ exc_info=True,
)
# If no backend found the connection, raise an error
@@ -269,6 +270,7 @@ async def _async_get_connection(conn_id: str) -> Connection:
"Unable to retrieve connection from secrets backend (%s). "
"Checking subsequent secrets backend.",
type(secrets_backend).__name__,
+ exc_info=True,
)
# If no backend found the connection, raise an error