Skyvern-AI / skyvern

Automate browser-based workflows with LLMs and Computer Vision
https://www.skyvern.com
GNU Affero General Public License v3.0
10.57k stars 725 forks source link

add workflow failure reason #1198

Closed LawyZheng closed 1 week ago

LawyZheng commented 1 week ago

[!IMPORTANT] Add failure_reason to workflow_runs and update related logic to capture and store failure reasons during workflow execution.

  • Database Changes:
    • Add failure_reason column to workflow_runs table in Alembic migration 2024_11_15_0251-1909715536dc_add_failure_reason_column_to_workflow_.py.
    • Update WorkflowRunModel in models.py to include failure_reason.
  • Functionality:
    • Modify update_workflow_run() in client.py to accept failure_reason.
    • Update execute_safe() in block.py to set failure_reason on exceptions.
    • Enhance execute_workflow() in service.py to log failure_reason when blocks fail.
  • Models and Conversions:
    • Update convert_to_workflow_run() in utils.py to include failure_reason.
    • Add failure_reason to WorkflowRun in workflow.py.
  • Miscellaneous:
    • Update various block execution methods in block.py to handle failure_reason.
    • Adjust logging and error handling to incorporate failure_reason in service.py.

This description was created by Ellipsis for 8e8aae4ec746b06000749d7b2d52df6c9bfe3456. It will automatically update as commits are pushed.