From 703ea2d6bdbfc536315dacc745d7f82e6484d00f Mon Sep 17 00:00:00 2001 From: Ankit Chaurasia <8670962+sunank200@users.noreply.github.com> Date: Fri, 4 Apr 2025 21:07:33 +0545 Subject: [PATCH] Change default value for core executor --- .../src/airflow/cli/commands/config_command.py | 12 +++++++++--- airflow-core/src/airflow/configuration.py | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/airflow-core/src/airflow/cli/commands/config_command.py b/airflow-core/src/airflow/cli/commands/config_command.py index 34ba6aaa0e16c..e436184f0eda5 100644 --- a/airflow-core/src/airflow/cli/commands/config_command.py +++ b/airflow-core/src/airflow/cli/commands/config_command.py @@ -150,6 +150,12 @@ def message(self) -> str | None: renamed_to=ConfigParameter("core", "sensitive_var_conn_names"), ), # core + ConfigChange( + config=ConfigParameter("core", "executor"), + default_change=True, + new_default="LocalExecutor", + was_removed=False, + ), ConfigChange( config=ConfigParameter("core", "check_slas"), suggestion="The SLA feature is removed in Airflow 3.0, to be replaced with Airflow Alerts in future", @@ -781,9 +787,10 @@ def update_config(args) -> None: config_dict = conf.as_dict( display_source=True, - include_env=True, - include_cmds=True, + include_env=False, + include_cmds=False, include_secret=True, + display_sensitive=True, ) for change in CONFIGS_CHANGES: conf_section = change.config.section.lower() @@ -806,7 +813,6 @@ def update_config(args) -> None: continue current_value = value_data[0] - if change.default_change: if str(current_value) != str(change.new_default): modifications.add_default_update(conf_section, conf_option, str(change.new_default)) diff --git a/airflow-core/src/airflow/configuration.py b/airflow-core/src/airflow/configuration.py index 815122806954d..f3679d66cae39 100644 --- a/airflow-core/src/airflow/configuration.py +++ b/airflow-core/src/airflow/configuration.py @@ -388,6 +388,9 @@ def inversed_deprecated_sections(self): "XX-set-after-default-config-loaded-XX", ), }, + "core": { + "executor": (re.compile(re.escape("SequentialExecutor")), "LocalExecutor"), + }, } _available_logging_levels = ["CRITICAL", "FATAL", "ERROR", "WARN", "WARNING", "INFO", "DEBUG"]