sunank200 commented on code in PR #48403:
URL: https://github.com/apache/airflow/pull/48403#discussion_r2018613789


##########
airflow-core/src/airflow/cli/commands/config_command.py:
##########
@@ -704,3 +705,144 @@ def lint_config(args) -> None:
         console.print("\n[red]Please update your configuration file 
accordingly.[/red]")
     else:
         console.print("[green]No issues found in your airflow.cfg. It is ready 
for Airflow 3![/green]")
+
+
+@providers_configuration_loaded
+def update_config(args) -> None:
+    """
+    Update the airflow.cfg file to migrate configuration changes from Airflow 
2.x to Airflow 3.
+
+    This command scans the current configuration file for parameters that have 
been renamed,
+    removed, or had their default values changed in Airflow 3.0, and 
automatically updates
+    the configuration file.
+
+    CLI Arguments:
+        --section: str (optional)
+            Comma-separated list of configuration sections to update.
+            Example: --section core,database
+
+        --option: str (optional)
+            Comma-separated list of configuration options to update.
+            Example: --option sql_alchemy_conn,dag_concurrency
+
+        --ignore-section: str (optional)
+            Comma-separated list of configuration sections to ignore during 
update.
+            Example: --ignore-section webserver
+
+        --ignore-option: str (optional)
+            Comma-separated list of configuration options to ignore during 
update.
+            Example: --ignore-option check_slas
+
+        --dry-run: flag (optional)
+            Dry-run mode (print the changes without modifying airflow.cfg)
+            Example: --dry-run
+
+    Examples:
+        1. Update the entire configuration file:
+            airflow config update
+
+        2. Update only the 'core' and 'database' sections:
+            airflow config update --section core,database
+
+        3. Update only specific options:
+            airflow config update --option sql_alchemy_conn,dag_concurrency
+
+        4. Ignore updates for a specific section:
+            airflow config update --ignore-section webserver
+
+        5. Dry-run mode (print the changes without modifying airflow.cfg):
+            airflow config update --dry-run

Review Comment:
   changed it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to