-
Notifications
You must be signed in to change notification settings - Fork 30
fix: JsonPlusRedisSerializer handling proper Serialization of Interrupt #108
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
base: main
Are you sure you want to change the base?
fix: JsonPlusRedisSerializer handling proper Serialization of Interrupt #108
Conversation
|
@bsbodden please review |
bsbodden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR addresses a real issue, but conflicts with PR #112. Needs modifications before merging.
Your PR includes this code (lines 43-52 in diff):
try:
from langgraph.types import Interrupt
if isinstance(obj, Interrupt):
# Serialize Interrupt as a constructor format for proper deserialization
return super().dumps(obj)
except ImportError:
passThis conflicts with PR #112 which removes the try/except pattern and changes dumps() to use orjson.dumps(obj, default=self._default) directly.
PR #112 establishes the correct pattern: always use orjson with the default handler
rebase this PR and:
-
Remove the special Interrupt handling in dumps() (lines 43-52)
- The
_defaulthandler should already serialize Interrupts correctly - Test to confirm this works
- The
-
Update tests if needed
Great work identifying and fixing this bug! 🎉
|
@bsbodden please check now |
|
@bsbodden is their any other issue? |
|
Works for me! |
|
@keenborder786 Tests and linting failures on this PR still. Pull down, rebase against main and try |
|
@bsbodden okay let me check |
|
Hi @keenborder786! 👋 Thank you for your contribution on addressing the Interrupt serialization issue (#33556). The Interrupt serialization fix is already working in main! 🎉 PR #120 (which upgraded to LangGraph 1.0 and Checkpoint 3.0) included comprehensive Interrupt handling using a interrupt type marker approach. So the core functionality you were addressing is What I've Prepared for You I've updated your PR to work with the current codebase and created a patch file that you can apply. The updated version:
Test Results ✅ All 392 tests pass (382 existing + 10 new) Files Attached I've created:
pr-108-checkpoint-3.0-update.patch How to Apply Save the patch file to your repo rootgit checkout main Then you can update your existing PR or create a new one with these changes. Value of This Update Even though the implementation is already in main, your test coverage is still valuable because:
|
|
@bsbodden excellent |
Takes care of the following issue raised in langchain: langchain-ai/langchain#33556