This is an automated email from the ASF dual-hosted git repository.
dstandish 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 8378d273985 Revert change to unit test mode conf get (#48775)
8378d273985 is described below
commit 8378d27398513ee89ffbffcfede0ee1257f6a137
Author: Daniel Standish <[email protected]>
AuthorDate: Thu Apr 3 20:46:52 2025 -0700
Revert change to unit test mode conf get (#48775)
Previously it was always evaluating to True because the setting retrieved
with `get` came out as string, and it was truthy evaluation.
It makes sense to correct it -- clearly it's not doing what was intended.
But, correcting it has broken some other processes, and we need to revert for
now while we figure out better solution.
---
airflow-core/src/airflow/models/dagcode.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow-core/src/airflow/models/dagcode.py
b/airflow-core/src/airflow/models/dagcode.py
index 54347df6084..696f34ce0db 100644
--- a/airflow-core/src/airflow/models/dagcode.py
+++ b/airflow-core/src/airflow/models/dagcode.py
@@ -120,7 +120,7 @@ class DagCode(Base):
code = f.read()
return code
except FileNotFoundError:
- test_mode = conf.getboolean("core", "unit_test_mode")
+ test_mode = conf.get("core", "unit_test_mode")
if test_mode:
return "source_code"
raise