Skip to content

Commit

Permalink
Bring back automated airflow home dir creation
Browse files Browse the repository at this point in the history
The apache#32604 moved initialization of airflow config to after config
initialization but webserver config is still in initialization
part. Previously when the AIRFLOW_HOME folder was missing, it was
created during config writing but it needs to be created now
before webserver config is written.
  • Loading branch information
potiuk committed Jul 21, 2023
1 parent 73b90c4 commit 4b9e5d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions airflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,7 @@ def initialize_config() -> AirflowConfigParser:
if not os.path.isfile(WEBSERVER_CONFIG):
import shutil

pathlib.Path(WEBSERVER_CONFIG).parent.mkdir(parents=True, exist_ok=True)
log.info("Creating new FAB webserver config file in: %s", WEBSERVER_CONFIG)
shutil.copy(_default_config_file_path("default_webserver_config.py"), WEBSERVER_CONFIG)
return airflow_config_parser
Expand Down

0 comments on commit 4b9e5d1

Please sign in to comment.