[PR #116] [MERGED] Prevent workflow server crash on invalid reload #133

Closed
opened 2026-02-16 02:16:41 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-py/pull/116
Author: @adrianlyjak
Created: 9/29/2025
Status: Merged
Merged: 9/30/2025
Merged by: @adrianlyjak

Base: mainHead: cursor/LI-3710-prevent-workflow-server-crash-on-invalid-reload-6443


📝 Commits (3)

  • b3041c4 Fix: Handle errors during workflow resume and context restoration
  • a76d027 Refactor server startup to handle invalid contexts gracefully
  • f32b201 Fix: Improve invalid context test case

📊 Changes

2 files changed (+60 additions, -2 deletions)

View changed files

📝 src/workflows/server/server.py (+20 -2)
📝 tests/server/test_server_persistence.py (+40 -0)

📄 Description

Catch deserialization and startup errors for persisted workflows to prevent server crashes.

When reloading workflows, if a workflow's context is invalid or it fails to start, the server previously crashed. This change logs the error and marks the specific handler as failed, allowing the server to continue running with other valid workflows.


Linear Issue: LI-3710

Open in Cursor Open in Web


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/workflows-py/pull/116 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 9/29/2025 **Status:** ✅ Merged **Merged:** 9/30/2025 **Merged by:** [@adrianlyjak](https://github.com/adrianlyjak) **Base:** `main` ← **Head:** `cursor/LI-3710-prevent-workflow-server-crash-on-invalid-reload-6443` --- ### 📝 Commits (3) - [`b3041c4`](https://github.com/run-llama/workflows-py/commit/b3041c452627bea11757c460ce3f5ab6ae3796ab) Fix: Handle errors during workflow resume and context restoration - [`a76d027`](https://github.com/run-llama/workflows-py/commit/a76d0276e7a9545aa8a5665b7bef27536de038f8) Refactor server startup to handle invalid contexts gracefully - [`f32b201`](https://github.com/run-llama/workflows-py/commit/f32b2013e89ddda15f1134c666846e874cf3b335) Fix: Improve invalid context test case ### 📊 Changes **2 files changed** (+60 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/workflows/server/server.py` (+20 -2) 📝 `tests/server/test_server_persistence.py` (+40 -0) </details> ### 📄 Description Catch deserialization and startup errors for persisted workflows to prevent server crashes. When reloading workflows, if a workflow's context is invalid or it fails to start, the server previously crashed. This change logs the error and marks the specific handler as failed, allowing the server to continue running with other valid workflows. --- Linear Issue: [LI-3710](https://linear.app/llamaindex/issue/LI-3710/make-workflow-server-not-crash-if-existing-workflows-are-invalid) <a href="https://cursor.com/background-agent?bcId=bc-ef132dfb-4b70-41cf-9016-c859925842b9"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-ef132dfb-4b70-41cf-9016-c859925842b9"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 02:16:41 -05:00
yindo closed this issue 2026-02-16 02:16:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#133