kaxil commented on code in PR #44954:
URL: https://github.com/apache/airflow/pull/44954#discussion_r1888504036


##########
airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -201,6 +201,12 @@ def ti_update_state(
 
     if isinstance(ti_patch_payload, TITerminalStatePayload):
         query = TI.duration_expression_update(ti_patch_payload.end_date, 
query, session.bind)
+        query = query.values(
+            state=ti_patch_payload.state,
+        )
+        if ti_patch_payload.state == State.FAILED:
+            # clear the next_method and next_kwargs
+            query = query.values(next_method=None, next_kwargs=None)

Review Comment:
   What about other things that we need to support, the one's linked below:
   
   
https://github.com/apache/airflow/blob/8848d6e35f6ead2cc1ed9887af8360fbd61c78c3/airflow/models/taskinstance.py#L3039-L3040
   
   
https://github.com/apache/airflow/blob/8848d6e35f6ead2cc1ed9887af8360fbd61c78c3/airflow/models/taskinstance.py#L3085-L3086
   
   



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