kaxil opened a new pull request, #76860:
URL: https://github.com/apache/airflow/pull/76860

   The durable execution docs said a clear keeps the agent's journal, so a 
cleared task replays what its failed attempts recorded. That stopped being true 
for the common case before the page was written: since #72100, clearing a task 
instance from the UI or `POST /dags/{dag_id}/clearTaskInstances` deletes the 
task's state store entries unless `keep_task_state` is set, and on Airflow 3.3+ 
the journal lives in that store. The claim came in with #74385, two weeks after 
#72100 merged.
   
   This adds a "Clearing a task" section to `durable_execution.rst` that says 
when a cleared task replays. On Airflow 3.4+ a task-instance clear starts the 
agent over unless "Keep task state and resume" is ticked (or `keep_task_state` 
is set). A Dag-run clear keeps the journal. Before 3.4 no clear removes it. The 
section links the core "Retries resume, clearing starts over" section for the 
full list of clear paths instead of copying it. It also says the 3.4 discard 
only reaches the default state store backend, which the core 
`_discard_task_state_store` docstring calls out.
   
   The `usage_limits` docs in `AgentOperator`'s docstring and 
`operators/agent.rst` drop the same claim and point to the new section. They 
now say that clearing a *finished* task instance starts a fresh budget: the 
budget resets when `max_tries` changes, and clearing a running task instance 
doesn't bump it, as `operators/agent.rst` already said a few lines up.
   
   Checked on a local Airflow (main) with a durable agent whose second tool 
fails on the first attempt, then cleared three ways. Task log of the rerun:
   
   | How it was cleared | Rerun's durable summary line |
   |---|---|
   | Task instance, "Keep task state and resume" ticked | `replayed 2 steps (1 
model, 1 tool, 0 other), recorded 2 new steps` |
   | Task instance, box not ticked | `replayed 0 steps (0 model, 0 tool, 0 
other), recorded 4 new steps` |
   | Whole Dag run (REST) | `replayed 2 steps (1 model, 1 tool, 0 other)` |
   
   Docs only; no behaviour change.
   


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