ashb commented on a change in pull request #17485:
URL: https://github.com/apache/airflow/pull/17485#discussion_r701838466



##########
File path: airflow/models/dag.py
##########
@@ -1967,6 +1974,14 @@ def run(
         :type: bool
 
         """
+        if mark_success is not None:
+            warnings.warn(
+                'The argument `mark_success` has been deprecated. Use 
`state=State.SUCCESS` instead.',
+                DeprecationWarning,

Review comment:
       ```suggestion
                   DeprecationWarning,
                   stacklevel=2,
   ```

##########
File path: airflow/models/taskinstance.py
##########
@@ -536,10 +552,18 @@ def generate_command(
         :return: shell command that can be used to run the task instance
         :rtype: list[str]
         """
+        if mark_success is not None:
+            warnings.warn(
+                'The argument `mark_success` has been deprecated. Use 
`state=State.SUCCESS` instead.',
+                DeprecationWarning,

Review comment:
       ```suggestion
                   DeprecationWarning,
                   stacklevel=2,
   ```

##########
File path: airflow/jobs/local_task_job.py
##########
@@ -49,12 +50,21 @@ def __init__(
         ignore_depends_on_past: bool = False,
         ignore_task_deps: bool = False,
         ignore_ti_state: bool = False,
-        mark_success: bool = False,
+        mark_as: Optional[TaskInstanceState] = None,
+        mark_success: Optional[bool] = None,
         pickle_id: Optional[str] = None,
         pool: Optional[str] = None,
         *args,
         **kwargs,
     ):
+        if mark_success is not None:
+            warnings.warn(
+                'The argument `mark_success` has been deprecated. Use 
`state=State.SUCCESS` instead.',
+                DeprecationWarning,

Review comment:
       ```suggestion
                   DeprecationWarning,
                   stacklevel=2,
   ```

##########
File path: airflow/models/baseoperator.py
##########
@@ -1252,15 +1253,25 @@ def run(
         end_date: Optional[datetime] = None,
         ignore_first_depends_on_past: bool = True,
         ignore_ti_state: bool = False,
-        mark_success: bool = False,
+        mark_as: Optional[TaskInstanceState] = None,
+        mark_success: Optional[bool] = None,
     ) -> None:
         """Run a set of task instances for a date range."""
+        if mark_success is not None:
+            warnings.warn(
+                'The argument `mark_success` has been deprecated. Use 
`state=State.SUCCESS` instead.',
+                DeprecationWarning,

Review comment:
       ```suggestion
                   DeprecationWarning,
                   stacklevel=2,
   ```

##########
File path: airflow/models/taskinstance.py
##########
@@ -440,6 +441,14 @@ def command_as_list(
         installed. This command is part of the message sent to executors by
         the orchestrator.
         """
+        if mark_success is not None:
+            warnings.warn(
+                'The argument `mark_success` has been deprecated. Use 
`state=State.SUCCESS` instead.',
+                DeprecationWarning,

Review comment:
       ```suggestion
                   DeprecationWarning,
                   stacklevel=2,
   ```




-- 
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