[PR #183] [MERGED] fix sqlite persistence: Properly serialize/deserialize result #196

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

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-py/pull/183
Author: @adrianlyjak
Created: 11/1/2025
Status: Merged
Merged: 11/1/2025
Merged by: @adrianlyjak

Base: mainHead: adrian/serialization-bug


📝 Commits (1)

📊 Changes

2 files changed (+46 additions, -1 deletions)

View changed files

📝 src/workflows/server/sqlite/sqlite_workflow_store.py (+4 -1)
📝 tests/server/test_sqlite_workflow_store.py (+42 -0)

📄 Description

Fix for this bug in the server

  File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/starlette/routing.py", line 694, in lifespan
    async with self.lifespan_context(app) as maybe_state:
               ~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/Users/adrianlyjak/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/contextlib.py", line 221, in __aexit__
    await anext(self.gen)
  File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan
    async with original_context(app) as maybe_original_state:
               ~~~~~~~~~~~~~~~~^^^^^
  File "/Users/adrianlyjak/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/contextlib.py", line 221, in __aexit__
    await anext(self.gen)
  File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/llama_deploy/appserver/app.py", line 98, in lifespan
    async with server.contextmanager():
               ~~~~~~~~~~~~~~~~~~~~~^^
  File "/Users/adrianlyjak/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/contextlib.py", line 221, in __aexit__
    await anext(self.gen)
  File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/workflows/server/server.py", line 247, in contextmanager
    await self.stop()
  File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/workflows/server/server.py", line 253, in stop
    await asyncio.gather(
        *[self._close_handler(handler) for handler in list(self._handlers.values())]
    )
  File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/workflows/server/server.py", line 1374, in _close_handler
    await handler.task
TypeError: Object of type MetadataResponse is not JSON serializable


🔄 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/183 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 11/1/2025 **Status:** ✅ Merged **Merged:** 11/1/2025 **Merged by:** [@adrianlyjak](https://github.com/adrianlyjak) **Base:** `main` ← **Head:** `adrian/serialization-bug` --- ### 📝 Commits (1) - [`ec79543`](https://github.com/run-llama/workflows-py/commit/ec795431b9d768df176b7951912ca7fc1e7963d1) Fixup sqlite persistence ### 📊 Changes **2 files changed** (+46 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/workflows/server/sqlite/sqlite_workflow_store.py` (+4 -1) 📝 `tests/server/test_sqlite_workflow_store.py` (+42 -0) </details> ### 📄 Description Fix for this bug in the server ``` File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/starlette/routing.py", line 694, in lifespan async with self.lifespan_context(app) as maybe_state: ~~~~~~~~~~~~~~~~~~~~~^^^^^ File "/Users/adrianlyjak/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/contextlib.py", line 221, in __aexit__ await anext(self.gen) File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/fastapi/routing.py", line 210, in merged_lifespan async with original_context(app) as maybe_original_state: ~~~~~~~~~~~~~~~~^^^^^ File "/Users/adrianlyjak/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/contextlib.py", line 221, in __aexit__ await anext(self.gen) File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/llama_deploy/appserver/app.py", line 98, in lifespan async with server.contextmanager(): ~~~~~~~~~~~~~~~~~~~~~^^ File "/Users/adrianlyjak/.local/share/uv/python/cpython-3.13.3-macos-aarch64-none/lib/python3.13/contextlib.py", line 221, in __aexit__ await anext(self.gen) File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/workflows/server/server.py", line 247, in contextmanager await self.stop() File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/workflows/server/server.py", line 253, in stop await asyncio.gather( *[self._close_handler(handler) for handler in list(self._handlers.values())] ) File "/Users/adrianlyjak/dev/ws/extraction-review/.venv/lib/python3.13/site-packages/workflows/server/server.py", line 1374, in _close_handler await handler.task TypeError: Object of type MetadataResponse is not JSON serializable ``` --- <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:54 -05:00
yindo closed this issue 2026-02-16 02:16:54 -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#196