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

henry3260 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 17aa5415c7c Mark providers commands for airflowctl (#68525)
17aa5415c7c is described below

commit 17aa5415c7c36555b7fc645b9b27c21e2965c6d6
Author: Henry Chen <[email protected]>
AuthorDate: Thu Jul 2 13:55:17 2026 +0800

    Mark providers commands for airflowctl (#68525)
    
    The airflowctl migration direction now keeps existing airflow CLI behavior 
unchanged and only records commands that should no longer receive new 
development.
---
 airflow-core/src/airflow/cli/commands/provider_command.py         | 3 +++
 airflow-core/tests/unit/cli/commands/test_command_deprecations.py | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/cli/commands/provider_command.py 
b/airflow-core/src/airflow/cli/commands/provider_command.py
index 645618fd852..fa24b8bb8b8 100644
--- a/airflow-core/src/airflow/cli/commands/provider_command.py
+++ b/airflow-core/src/airflow/cli/commands/provider_command.py
@@ -22,6 +22,7 @@ import re
 import sys
 
 from airflow.cli.simple_table import AirflowConsole
+from airflow.cli.utils import deprecated_for_airflowctl
 from airflow.providers_manager import ProvidersManager
 from airflow.utils.cli import suppress_logs_and_warning
 from airflow.utils.providers_configuration_loader import 
providers_configuration_loaded
@@ -33,6 +34,7 @@ def _remove_rst_syntax(value: str) -> str:
     return re.sub("[`_<>]", "", value.strip(" \n."))
 
 
+@deprecated_for_airflowctl("airflowctl providers get")
 @suppress_logs_and_warning
 @providers_configuration_loaded
 def provider_get(args):
@@ -55,6 +57,7 @@ def provider_get(args):
         raise SystemExit(f"No such provider installed: {args.provider_name}")
 
 
+@deprecated_for_airflowctl("airflowctl providers list")
 @suppress_logs_and_warning
 @providers_configuration_loaded
 def providers_list(args):
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 e6212d31a7f..c006a8c3876 100644
--- a/airflow-core/tests/unit/cli/commands/test_command_deprecations.py
+++ b/airflow-core/tests/unit/cli/commands/test_command_deprecations.py
@@ -30,7 +30,7 @@ from __future__ import annotations
 
 import pytest
 
-from airflow.cli.commands import asset_command, dag_command, pool_command, 
variable_command
+from airflow.cli.commands import asset_command, dag_command, pool_command, 
provider_command, variable_command
 
 # (command callable, expected airflowctl replacement recorded by the decorator)
 MIGRATED_CLI_COMMANDS = [
@@ -51,6 +51,8 @@ MIGRATED_CLI_COMMANDS = [
     (asset_command.asset_materialize, "airflowctl assets materialize"),
     (asset_command.asset_list, "airflowctl assets list / airflowctl assets 
list-aliases"),
     (asset_command.asset_details, "airflowctl assets get / airflowctl assets 
get-by-alias"),
+    (provider_command.provider_get, "airflowctl providers get"),
+    (provider_command.providers_list, "airflowctl providers list"),
 ]
 
 

Reply via email to