You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9c01b02
Browse filesBrowse the repository at this point in the historyBrowse files
fix(workflow): record runs that finish without a result so resume replays them
A node run that finished with no output, route or transfer and emitted no
event left nothing in the session showing it ran, so resuming after a
RequestInput ran it (and its side effects) again. The same applied to
ctx.run_node children and to children of a retried sub-workflow.
NodeRunner now emits a completion marker (NodeInfo.completed) for such a
run. The resume scan records it on the child's scan state, and
check_interception fast-forwards a dynamic run that has one instead of
running it again.
Fixesgoogle#7666
Copy file name to clipboardExpand all lines: docs/guides/workflow/retry_config/index.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ inner = Workflow(
103
103
)
104
104
```
105
105
106
-
A retried sub-workflow does not redo work it already finished. Children that produced an output or a state change are replayed from the session's events, so only the failed node and whatever follows it run again. A child that produced neither leaves nothing to replay and runs again on every attempt, so give a side-effecting node an output or a state change if repeating it would be harmful.
106
+
A retried sub-workflow does not redo work it already finished. Finished children are replayed from the session's events, so only the failed node and whatever follows it run again. This includes a child that finished without an output or a state change: ADK records that it finished, so its side effects are not repeated.
107
107
108
108
Setting `RetryConfig` on the node that can fail is still the narrower option, and it retries just that node rather than the whole sub-workflow.
-**The attempt counter does not survive an interrupt.** It is **not** persisted. If the workflow is interrupted, whether by a human-in-the-loop input downstream or by the application restarting, and is later resumed, a node that has to run again starts counting from 1 with its full budget of attempts back.
126
126
-**Retries are local to the node.** They happen inside that node's execution and nowhere else. Once a node has used up its attempts it enters the `FAILED` state, and the workflow execution fails with it, or follows whatever error handling you have configured.
127
-
-**A retried `Workflow` runs some finished children again.** A child that produced no output and no state change runs again, because the replay has no record that it completed. See [Retrying a nested workflow](#retrying-a-nested-workflow).
128
127
-**A cancelled child can be replayed as finished.** A child that was cancelled right after it emitted an event without an output, such as a progress message, looks finished to the replay. The retry then hands back no output for it instead of running it again. A parallel worker item that is cancelled because another item failed is the usual case.
0 commit comments