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

potiuk 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 1b6699ed54 task command deprecated option ignore-depends-on-past 
removal (#41635)
1b6699ed54 is described below

commit 1b6699ed544e7d3e758d96a44c205b9d97140213
Author: Gopal Dirisala <[email protected]>
AuthorDate: Wed Aug 21 19:24:09 2024 +0530

    task command deprecated option ignore-depends-on-past removal (#41635)
    
    * task command deprecated option ignore-depends-on-past removal
    
    * news fragment added
---
 airflow/cli/cli_config.py               |  7 -------
 airflow/cli/commands/task_command.py    |  1 -
 airflow/utils/cli.py                    | 10 +---------
 newsfragments/41635.significant.rst     |  1 +
 tests/cli/commands/test_task_command.py |  1 -
 5 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/airflow/cli/cli_config.py b/airflow/cli/cli_config.py
index 2699165484..43c853a060 100644
--- a/airflow/cli/cli_config.py
+++ b/airflow/cli/cli_config.py
@@ -617,12 +617,6 @@ ARG_IGNORE_DEPENDENCIES = Arg(
     help="Ignore task-specific dependencies, e.g. upstream, depends_on_past, 
and retry delay dependencies",
     action="store_true",
 )
-ARG_IGNORE_DEPENDS_ON_PAST = Arg(
-    ("-I", "--ignore-depends-on-past"),
-    help="Deprecated -- use `--depends-on-past ignore` instead. "
-    "Ignore depends_on_past dependencies (but respect upstream dependencies)",
-    action="store_true",
-)
 ARG_DEPENDS_ON_PAST = Arg(
     ("-d", "--depends-on-past"),
     help="Determine how Airflow should deal with past dependencies. The 
default action is `check`, Airflow "
@@ -1382,7 +1376,6 @@ TASKS_COMMANDS = (
             ARG_RAW,
             ARG_IGNORE_ALL_DEPENDENCIES,
             ARG_IGNORE_DEPENDENCIES,
-            ARG_IGNORE_DEPENDS_ON_PAST,
             ARG_DEPENDS_ON_PAST,
             ARG_SHIP_DAG,
             ARG_PICKLE,
diff --git a/airflow/cli/commands/task_command.py 
b/airflow/cli/commands/task_command.py
index c4c6db386a..ffb08ff66d 100644
--- a/airflow/cli/commands/task_command.py
+++ b/airflow/cli/commands/task_command.py
@@ -330,7 +330,6 @@ def _run_task_by_local_task_job(args, ti: TaskInstance | 
TaskInstancePydantic) -
 
 RAW_TASK_UNSUPPORTED_OPTION = [
     "ignore_all_dependencies",
-    "ignore_depends_on_past",
     "ignore_dependencies",
     "force",
 ]
diff --git a/airflow/utils/cli.py b/airflow/utils/cli.py
index 00e6e15ba3..e8b9e6f7d2 100644
--- a/airflow/utils/cli.py
+++ b/airflow/utils/cli.py
@@ -36,7 +36,7 @@ from sqlalchemy import select
 
 from airflow import settings
 from airflow.api_internal.internal_api_call import InternalApiConfig
-from airflow.exceptions import AirflowException, RemovedInAirflow3Warning
+from airflow.exceptions import AirflowException
 from airflow.utils import cli_action_loggers, timezone
 from airflow.utils.log.non_caching_file_handler import NonCachingFileHandler
 from airflow.utils.platform import getuser, is_terminal_support_colors
@@ -352,14 +352,6 @@ def should_use_colors(args) -> bool:
 
 
 def should_ignore_depends_on_past(args) -> bool:
-    if args.ignore_depends_on_past:
-        warnings.warn(
-            "Using `--ignore-depends-on-past` is Deprecated."
-            "Please use `--depends-on-past ignore` instead.",
-            RemovedInAirflow3Warning,
-            stacklevel=2,
-        )
-        return True
     return args.depends_on_past == "ignore"
 
 
diff --git a/newsfragments/41635.significant.rst 
b/newsfragments/41635.significant.rst
new file mode 100644
index 0000000000..0566d60747
--- /dev/null
+++ b/newsfragments/41635.significant.rst
@@ -0,0 +1 @@
+Removed deprecated ``--ignore-depends-on-past``  cli option from task command. 
Please use ``--depends-on-past ignore``.
diff --git a/tests/cli/commands/test_task_command.py 
b/tests/cli/commands/test_task_command.py
index 869d5a5a22..4ad96942c0 100644
--- a/tests/cli/commands/test_task_command.py
+++ b/tests/cli/commands/test_task_command.py
@@ -415,7 +415,6 @@ class TestCliTasks:
         "option",
         [
             "--ignore-all-dependencies",
-            "--ignore-depends-on-past",
             "--ignore-dependencies",
             "--force",
         ],

Reply via email to