This is an automated email from the ASF dual-hosted git repository.
potiuk 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 d987bce144 Revert the sequence of initializing configuration defaults
(#37155)
d987bce144 is described below
commit d987bce144ac8e42bd269e1971d0ad4f15dcff95
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Feb 3 15:43:38 2024 +0100
Revert the sequence of initializing configuration defaults (#37155)
---
airflow/configuration.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/airflow/configuration.py b/airflow/configuration.py
index e4e3dab4b3..f9a5f608eb 100644
--- a/airflow/configuration.py
+++ b/airflow/configuration.py
@@ -1985,6 +1985,8 @@ def write_default_airflow_configuration_if_needed() ->
AirflowConfigParser:
FERNET_KEY = _generate_fernet_key()
conf.remove_option("core", "fernet_key")
conf.set("core", "fernet_key", FERNET_KEY)
+ pathlib.Path(airflow_config.__fspath__()).touch()
+ make_group_other_inaccessible(airflow_config.__fspath__())
with open(airflow_config, "w") as file:
conf.write(
file,
@@ -1994,7 +1996,6 @@ def write_default_airflow_configuration_if_needed() ->
AirflowConfigParser:
extra_spacing=True,
only_defaults=True,
)
- make_group_other_inaccessible(airflow_config.__fspath__())
return conf