This is an automated email from the ASF dual-hosted git repository.

vatsrahul1001 pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 777ba1af58ee0e8fc701b9a9b4fe628bf522c56a
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Jul 5 15:52:17 2026 +0200

    [v3-3-test] [AIP-94] Mark connections commands as migrated to airflowctl 
(#68972) (#69410)
    
    (cherry picked from commit cf2806199fe07c5cab7c8287ab06dd1fbca83517)
    
    Co-authored-by: Yuseok Jo <[email protected]>
---
 airflow-core/src/airflow/cli/commands/connection_command.py | 13 ++++++++++++-
 .../tests/unit/cli/commands/test_command_deprecations.py    |  7 +++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/cli/commands/connection_command.py 
b/airflow-core/src/airflow/cli/commands/connection_command.py
index 8911bc80b99..ce87af7a9c3 100644
--- a/airflow-core/src/airflow/cli/commands/connection_command.py
+++ b/airflow-core/src/airflow/cli/commands/connection_command.py
@@ -30,7 +30,12 @@ from sqlalchemy import select
 from sqlalchemy.orm import exc
 
 from airflow.cli.simple_table import AirflowConsole
-from airflow.cli.utils import SENSITIVE_PLACEHOLDER, is_stdout, 
print_export_output
+from airflow.cli.utils import (
+    SENSITIVE_PLACEHOLDER,
+    deprecated_for_airflowctl,
+    is_stdout,
+    print_export_output,
+)
 from airflow.configuration import conf
 from airflow.exceptions import AirflowNotFoundException
 from airflow.models import Connection
@@ -140,6 +145,7 @@ def connections_get(args):
     )
 
 
+@deprecated_for_airflowctl("airflowctl connections list")
 @suppress_logs_and_warning
 @providers_configuration_loaded
 def connections_list(args):
@@ -186,6 +192,7 @@ def _connection_to_dict(conn: Connection) -> dict:
     }
 
 
+@deprecated_for_airflowctl("airflowctl connections create-defaults")
 def create_default_connections(args):
     db_create_default_connections()
 
@@ -283,6 +290,7 @@ alternative_conn_specs = ["conn_type", "conn_host", 
"conn_login", "conn_password
 
 
 @cli_utils.action_cli
+@deprecated_for_airflowctl("airflowctl connections create")
 @providers_configuration_loaded
 def connections_add(args):
     """Add new connection."""
@@ -379,6 +387,7 @@ def connections_add(args):
 
 
 @cli_utils.action_cli
+@deprecated_for_airflowctl("airflowctl connections delete")
 @providers_configuration_loaded
 def connections_delete(args):
     """Delete connection from DB."""
@@ -395,6 +404,7 @@ def connections_delete(args):
 
 
 @cli_utils.action_cli(check_db=False)
+@deprecated_for_airflowctl("airflowctl connections import")
 @providers_configuration_loaded
 def connections_import(args):
     """Import connections from a file."""
@@ -433,6 +443,7 @@ def _import_helper(file_path: str, overwrite: bool) -> None:
             print(f"Imported connection {conn_id}")
 
 
+@deprecated_for_airflowctl("airflowctl connections test")
 @suppress_logs_and_warning
 @providers_configuration_loaded
 def connections_test(args) -> None:
diff --git a/airflow-core/tests/unit/cli/commands/test_command_deprecations.py 
b/airflow-core/tests/unit/cli/commands/test_command_deprecations.py
index bcf7516dbd8..287b230ea34 100644
--- a/airflow-core/tests/unit/cli/commands/test_command_deprecations.py
+++ b/airflow-core/tests/unit/cli/commands/test_command_deprecations.py
@@ -33,6 +33,7 @@ import pytest
 from airflow.cli.commands import (
     asset_command,
     config_command,
+    connection_command,
     dag_command,
     pool_command,
     provider_command,
@@ -41,6 +42,12 @@ from airflow.cli.commands import (
 
 # (command callable, expected airflowctl replacement recorded by the decorator)
 MIGRATED_CLI_COMMANDS = [
+    (connection_command.connections_list, "airflowctl connections list"),
+    (connection_command.connections_add, "airflowctl connections create"),
+    (connection_command.connections_delete, "airflowctl connections delete"),
+    (connection_command.connections_import, "airflowctl connections import"),
+    (connection_command.connections_test, "airflowctl connections test"),
+    (connection_command.create_default_connections, "airflowctl connections 
create-defaults"),
     (dag_command.dag_trigger, "airflowctl dags trigger"),
     (dag_command.dag_delete, "airflowctl dags delete"),
     (dag_command.dag_details, "airflowctl dags get-details"),

Reply via email to