This is an automated email from the ASF dual-hosted git repository.
vatsrahul1001 pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-3-test by this push:
new 9eac46f0e05 [v3-3-test] Suppress noisy Alembic plugin setup logs
(#69916) (#70116)
9eac46f0e05 is described below
commit 9eac46f0e05bdc1c8a1ae0fb3d4161fba695bb1b
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jul 21 16:55:42 2026 +0530
[v3-3-test] Suppress noisy Alembic plugin setup logs (#69916) (#70116)
Alembic emits autogenerate plugin registration messages at INFO during CLI
startup. Those unrelated lines contaminate machine-readable command output,
while warnings and errors still need to remain visible.
(cherry picked from commit 58e124b88775314373ff5a5f0ed5432f1cbe2030)
Co-authored-by: Ephraim Anierobi <[email protected]>
---
shared/logging/src/airflow_shared/logging/structlog.py | 1 +
shared/logging/tests/logging/test_structlog.py | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/shared/logging/src/airflow_shared/logging/structlog.py
b/shared/logging/src/airflow_shared/logging/structlog.py
index 72884cfbde7..1c4341e99e5 100644
--- a/shared/logging/src/airflow_shared/logging/structlog.py
+++ b/shared/logging/src/airflow_shared/logging/structlog.py
@@ -709,6 +709,7 @@ def configure_logging(
# These ones are too chatty even at info
"httpx": {"level": "WARN"},
"sqlalchemy.engine": {"level": "WARN"},
+ "alembic.runtime.plugins": {"level": "WARN"},
}
)
config["root"] = {
diff --git a/shared/logging/tests/logging/test_structlog.py
b/shared/logging/tests/logging/test_structlog.py
index ca85bb4f20e..cf63d2ed778 100644
--- a/shared/logging/tests/logging/test_structlog.py
+++ b/shared/logging/tests/logging/test_structlog.py
@@ -464,6 +464,19 @@ def
test_logger_respects_configured_level(structlog_config):
assert "[my_logger] Debug message\n" in written
+def test_alembic_runtime_plugin_setup_logs_are_suppressed(structlog_config):
+ with structlog_config(
+ colors=False,
+ log_format="[%(name)s] %(message)s",
+ log_level="INFO",
+ ) as sio:
+ logger = logging.getLogger("alembic.runtime.plugins")
+ logger.info("Filtered plugin setup message")
+ logger.warning("Visible warning")
+
+ assert sio.getvalue() == "[alembic.runtime.plugins] Visible warning\n"
+
+
def test_excepthook_installed_when_json_output_true(structlog_config):
import sys