Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Add flow retry capability with state preservation #254

Merged
merged 5 commits into from
Dec 18, 2024

Conversation

toyamarinyon
Copy link
Contributor

Screen.Recording.2024-12-18.at.17.59.19.mov

Changes

  • Add retry button to failed execution steps
  • Implement execution snapshot system to preserve graph state
  • Add retry flow execution functionality that maintains execution history
  • Refactor execution state management for better reliability
  • Optimize blob listing with folded mode

Testing

Note

It is difficult to artificially cause an error and then succeed with a further retry, so it is OK if the normal case can be confirmed.

Execute a node on the playground

  • Visit /p/:agentId
  • Open playground
  • Put on node
  • Generate text with Text generator node

Execute a flow on the playground

  • Visit /p/:agentId
  • Open playground
  • Put on nodes
  • Connect the nodes
  • Execute flow with connected nodes

Reorganize button implementation and update visual design:
- Move inline button component from header to dedicated file
- Update button styles with rounded corners and consistent height
- Adjust shadow and typography properties for better aesthetics

This change maintains functionality while improving design consistency
across the playground interface.
Create execution snapshots that capture full graph context during execution:
- Add ExecutionSnapshot type to store complete execution state
- Include nodes, connections and flow data alongside execution details
- Modify putExecutionAction to store entire snapshot instead of just execution
- Add helper function to create snapshots from current graph state

This change enables proper replay and debugging of past executions by
preserving the complete graph state at execution time.
Add ability to retry failed flow executions with the following features:
- Preserve completed step results from original execution
- Retry only failed steps while maintaining execution context
- Add retry button in failed step UI
- Support full graph state restoration from execution snapshots

This change allows users to retry failed flows without recreating the entire
execution, saving time and maintaining execution history. Failed steps can
be retried while preserving successful results from previous attempts.
Clean up execution state management and snapshot handling:
- Restructure createExecutionSnapshot to use object params for clarity
- Fix step completion check to preserve completed step results
- Ensure retry uses original graph state from snapshot
- Remove unnecessary status filtering in executeJob

This change improves code maintainability and fixes issues with execution
state preservation during retries.
@toyamarinyon toyamarinyon requested a review from shige as a code owner December 18, 2024 09:01
Copy link

vercel bot commented Dec 18, 2024

@toyamarinyon is attempting to deploy a commit to the Edge Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
giselle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 9:06am

@toyamarinyon
Copy link
Contributor Author

dec18b_output.mp4

I was able to record a stream of Overloaded errors in the Preview environment, which were resolved by re-running.
The output result of the re-run is not displayed, which will be addressed separately.

Copy link
Member

@shige shige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ♻️

@toyamarinyon toyamarinyon merged commit 2b8caf0 into giselles-ai:main Dec 18, 2024
5 checks passed
@toyamarinyon toyamarinyon deleted the rerun branch December 18, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants