amoghrajesh commented on code in PR #72100:
URL: https://github.com/apache/airflow/pull/72100#discussion_r3987670578


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/task_instances.py:
##########
@@ -986,6 +987,10 @@ def _collect_relatives(run_id: str, direction: 
Literal["upstream", "downstream"]
         except AirflowClearRunningTaskException as e:
             raise HTTPException(status.HTTP_409_CONFLICT, str(e)) from e
 
+        # After the clear has succeeded, so a failed clear cannot take the 
task state with it.
+        if not body.keep_task_state:
+            _discard_task_state_store(task_instances, session, 
event="Discarded task state on clear")

Review Comment:
   Correct, discard-on-clear today only covers this one endpoint. Filed #72929 
to track extending it to Dag-run clear and mark-as-success/failed, and scoped 
the newsfragment/docs wording so it does not imply those paths are already 
covered. 
   
   



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