refactor: Remove stop_requested and run_id from ThreadInfo; update ex…#15
Merged
refactor: Remove stop_requested and run_id from ThreadInfo; update ex…#15
Conversation
…ecution state handling for stop requests
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ecution state handling for stop requests
This pull request refactors the way stop requests are handled during graph execution, shifting from a metadata-based approach to a state-driven mechanism. The main changes remove the use of
stop_requestedandrun_idfields from thread metadata, and instead rely on the execution state for stop signaling. This improves reliability and ensures stop requests are consistently detected across the system. The logic for checking stop requests has been centralized and streamlined, and legacy node name normalization has been updated for backward compatibility.Stop Request Handling Improvements
stop_requestedandrun_id) with a direct check on the execution state (is_stopped_requested()), ensuring stop signals are reliably picked up from the state itself. [1] [2] [3] [4]_check_stop_requestedmethods in bothinvoke_handler.pyandstream_handler.pythat reload the current state and check for stop requests, replacing the previousis_stop_requestedutility and related logic. [1] [2] [3] [4] [5] [6] [7] [8]State Reload and Utility Refactoring
is_stop_requestedutility intoreload_state, which now reloads the latest execution state from the checkpointer, supporting more robust and up-to-date state checks. [1] [2] [3]Legacy Node Name Normalization
__start__/__end__) instead of (start/end), improving backward compatibility with older persisted states. [1] [2]Graph Execution Logic
Type and Import Updates
Let me know if you want to walk through any of these changes in detail!