kacpermuda commented on code in PR #48941:
URL: https://github.com/apache/airflow/pull/48941#discussion_r2033389111


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:
##########
@@ -882,6 +886,20 @@ def patch_task_instance(
                     status.HTTP_409_CONFLICT, f"Task id {task_id} is already 
in {data['new_state']} state"
                 )
             ti = tis[0] if isinstance(tis, list) else tis
+            try:
+                if data["new_state"] == TaskInstanceState.SUCCESS:
+                    get_listener_manager().hook.on_task_instance_success(
+                        previous_state=TaskInstanceState.RUNNING, 
task_instance=ti

Review Comment:
   TODO This is TaskInstance and spec requires RunTimeTaskInstance. Spec should 
either allow TaskInstance as well or have some new methods for manual state 
change that accept TaskInstance.



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