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

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


The following commit(s) were added to refs/heads/v3-3-test by this push:
     new f266912c76a [v3-3-test] [AIP-94] Mark variables CLI commands as 
migrated to airflowctl (#68932) (#69127)
f266912c76a is described below

commit f266912c76a53878e44103092e42eaa774cdbe86
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jul 3 19:21:27 2026 +0200

    [v3-3-test] [AIP-94] Mark variables CLI commands as migrated to airflowctl 
(#68932) (#69127)
    
    (cherry picked from commit b74521b54885092613439fa5dbf1e50472dcd9e9)
    
    Signed-off-by: PoAn Yang <[email protected]>
    Co-authored-by: PoAn Yang <[email protected]>
---
 airflow-core/src/airflow/cli/commands/variable_command.py         | 7 ++++++-
 airflow-core/tests/unit/cli/commands/test_command_deprecations.py | 6 ++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/cli/commands/variable_command.py 
b/airflow-core/src/airflow/cli/commands/variable_command.py
index 5216aabb446..194b02b529a 100644
--- a/airflow-core/src/airflow/cli/commands/variable_command.py
+++ b/airflow-core/src/airflow/cli/commands/variable_command.py
@@ -26,7 +26,7 @@ from typing import TYPE_CHECKING
 from sqlalchemy import select
 
 from airflow.cli.simple_table import AirflowConsole
-from airflow.cli.utils import SENSITIVE_PLACEHOLDER, print_export_output
+from airflow.cli.utils import SENSITIVE_PLACEHOLDER, 
deprecated_for_airflowctl, print_export_output
 from airflow.exceptions import (
     AirflowFileParseException,
     AirflowUnsupportedFileTypeException,
@@ -63,6 +63,7 @@ class VariableDisplayMapper:
         return {"key": key, "val": val}
 
 
+@deprecated_for_airflowctl("airflowctl variables list")
 @suppress_logs_and_warning
 @providers_configuration_loaded
 def variables_list(args):
@@ -92,6 +93,7 @@ def variables_list(args):
             AirflowConsole().print_as(data=variables, output=args.output, 
mapper=None)
 
 
+@deprecated_for_airflowctl("airflowctl variables get")
 @suppress_logs_and_warning
 @providers_configuration_loaded
 def variables_get(args):
@@ -108,6 +110,7 @@ def variables_get(args):
 
 
 @cli_utils.action_cli
+@deprecated_for_airflowctl("airflowctl variables create")
 @providers_configuration_loaded
 def variables_set(args):
     """Create new variable with a given name, value and description."""
@@ -116,6 +119,7 @@ def variables_set(args):
 
 
 @cli_utils.action_cli
+@deprecated_for_airflowctl("airflowctl variables delete")
 @providers_configuration_loaded
 def variables_delete(args):
     """Delete variable by a given name."""
@@ -124,6 +128,7 @@ def variables_delete(args):
 
 
 @cli_utils.action_cli
+@deprecated_for_airflowctl("airflowctl variables import")
 @providers_configuration_loaded
 @provide_session
 def variables_import(args, *, session: Session = NEW_SESSION):
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 44f23c11119..411cb6a84f1 100644
--- a/airflow-core/tests/unit/cli/commands/test_command_deprecations.py
+++ b/airflow-core/tests/unit/cli/commands/test_command_deprecations.py
@@ -36,6 +36,7 @@ from airflow.cli.commands import (
     dag_command,
     pool_command,
     provider_command,
+    variable_command,
 )
 
 # (command callable, expected airflowctl replacement recorded by the decorator)
@@ -49,6 +50,11 @@ MIGRATED_CLI_COMMANDS = [
     (pool_command.pool_delete, "airflowctl pools delete"),
     (pool_command.pool_import, "airflowctl pools import"),
     (pool_command.pool_export, "airflowctl pools export"),
+    (variable_command.variables_list, "airflowctl variables list"),
+    (variable_command.variables_get, "airflowctl variables get"),
+    (variable_command.variables_set, "airflowctl variables create"),
+    (variable_command.variables_delete, "airflowctl variables delete"),
+    (variable_command.variables_import, "airflowctl variables import"),
     (asset_command.asset_materialize, "airflowctl assets materialize"),
     (provider_command.provider_get, "airflowctl providers get"),
     (provider_command.providers_list, "airflowctl providers list"),

Reply via email to