From c3b3adeebd6e27a632947d7d7446e4aad10acd8d Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Thu, 26 Dec 2024 16:21:36 +0900 Subject: [PATCH 1/2] style(cli): add comments comments as deliminator --- .../cli/commands/remote_commands/config_command.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/airflow/cli/commands/remote_commands/config_command.py b/airflow/cli/commands/remote_commands/config_command.py index 17e7b62321761..9add1b2f664da 100644 --- a/airflow/cli/commands/remote_commands/config_command.py +++ b/airflow/cli/commands/remote_commands/config_command.py @@ -110,6 +110,7 @@ def message(self) -> str: CONFIGS_CHANGES = [ + # admin ConfigChange( config=ConfigParameter("admin", "hide_sensitive_variable_fields"), renamed_to=ConfigParameter("core", "hide_sensitive_var_conn_fields"), @@ -118,6 +119,7 @@ def message(self) -> str: config=ConfigParameter("admin", "sensitive_variable_fields"), renamed_to=ConfigParameter("core", "sensitive_var_conn_names"), ), + # core ConfigChange( config=ConfigParameter("core", "check_slas"), suggestion="The SLA feature is removed in Airflow 3.0, to be replaced with Airflow Alerts in " @@ -188,6 +190,7 @@ def message(self) -> str: config=ConfigParameter("core", "max_db_retries"), renamed_to=ConfigParameter("database", "max_db_retries"), ), + # api ConfigChange( config=ConfigParameter("api", "access_control_allow_origin"), renamed_to=ConfigParameter("api", "access_control_allow_origins"), @@ -196,11 +199,13 @@ def message(self) -> str: config=ConfigParameter("api", "auth_backend"), renamed_to=ConfigParameter("api", "auth_backends"), ), + # logging ConfigChange( config=ConfigParameter("logging", "enable_task_context_logger"), suggestion="Remove TaskContextLogger: Replaced by the Log table for better handling of task log " "messages outside the execution context.", ), + # metrics ConfigChange( config=ConfigParameter("metrics", "metrics_use_pattern_match"), ), @@ -218,12 +223,15 @@ def message(self) -> str: config=ConfigParameter("metrics", "statsd_block_list"), renamed_to=ConfigParameter("metrics", "metrics_block_list"), ), + # traces ConfigChange( config=ConfigParameter("traces", "otel_task_log_event"), ), + # operators ConfigChange( config=ConfigParameter("operators", "allow_illegal_arguments"), ), + # webserver ConfigChange( config=ConfigParameter("webserver", "allow_raw_html_descriptions"), ), @@ -247,10 +255,12 @@ def message(self) -> str: config=ConfigParameter("webserver", "force_log_out_after"), renamed_to=ConfigParameter("webserver", "session_lifetime_minutes"), ), + # policy ConfigChange( config=ConfigParameter("policy", "airflow_local_settings"), renamed_to=ConfigParameter("policy", "task_policy"), ), + # scheduler ConfigChange( config=ConfigParameter("scheduler", "dependency_detector"), ), @@ -305,6 +315,7 @@ def message(self) -> str: config=ConfigParameter("scheduler", "statsd_custom_client_path"), renamed_to=ConfigParameter("metrics", "statsd_custom_client_path"), ), + # celery ConfigChange( config=ConfigParameter("celery", "stalled_task_timeout"), renamed_to=ConfigParameter("scheduler", "task_queued_timeout"), @@ -317,6 +328,7 @@ def message(self) -> str: config=ConfigParameter("celery", "task_adoption_timeout"), renamed_to=ConfigParameter("scheduler", "task_queued_timeout"), ), + # kubernetes_executor ConfigChange( config=ConfigParameter("kubernetes_executor", "worker_pods_pending_timeout"), renamed_to=ConfigParameter("scheduler", "task_queued_timeout"), @@ -325,6 +337,7 @@ def message(self) -> str: config=ConfigParameter("kubernetes_executor", "worker_pods_pending_timeout_check_interval"), renamed_to=ConfigParameter("scheduler", "task_queued_timeout_check_interval"), ), + # smtp ConfigChange( config=ConfigParameter("smtp", "smtp_user"), suggestion="Please use the SMTP connection (`smtp_default`).", From 065730d310eba318f90b5abc27956fe2458b7a35 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Thu, 26 Dec 2024 16:25:18 +0900 Subject: [PATCH 2/2] feat(cli): add removed "core.task_runner" and "core.enable_xcom_pickling" check to command "airflow config lint" --- airflow/cli/commands/remote_commands/config_command.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airflow/cli/commands/remote_commands/config_command.py b/airflow/cli/commands/remote_commands/config_command.py index 9add1b2f664da..35b3e5d46bd3f 100644 --- a/airflow/cli/commands/remote_commands/config_command.py +++ b/airflow/cli/commands/remote_commands/config_command.py @@ -190,6 +190,8 @@ def message(self) -> str: config=ConfigParameter("core", "max_db_retries"), renamed_to=ConfigParameter("database", "max_db_retries"), ), + ConfigChange(config=ConfigParameter("core", "task_runner")), + ConfigChange(config=ConfigParameter("core", "enable_xcom_pickling")), # api ConfigChange( config=ConfigParameter("api", "access_control_allow_origin"),