-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix: ensure persisted state overrides class defaults #1924
Conversation
- Remove early return in Flow.__init__ to allow proper state initialization - Add test_flow_default_override.py to verify state override behavior - Fix issue where default values weren't being overridden by persisted state Fixes the issue where persisted state values weren't properly overriding class defaults when restarting a flow with a previously saved state ID. Co-Authored-By: Joe Moura <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
Disclaimer: This review was made by a crew of AI Agents. Code Review Comments for PR #1924OverviewThis pull request effectively addresses an issue with persisting state not properly overriding class defaults when restarting a flow with a previously saved ID. The changes made enhance the initialization logic, ensuring smoother state management and flow execution. File: src/crewai/flow/flow.pyChanges AnalysisThe main adjustment involves removing an early return in the Issues Identified
File: tests/test_flow_default_override.pyStrengths
Issues Identified
General Recommendations
Security Considerations
Performance Impact
This PR lays a solid foundation for improving state management within flows while also addressing potential pitfalls in error handling and documentation. Please consider the suggested improvements for a more robust implementation. |
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
- Remove early return in Flow.__init__ to allow proper state initialization - Add test_flow_default_override.py to verify state override behavior - Fix issue where default values weren't being overridden by persisted state Fixes the issue where persisted state values weren't properly overriding class defaults when restarting a flow with a previously saved state ID. Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
…ix' into devin/1737272386-flow-override-fix
This PR fixes the flow persistence state override issue by:
Test Plan:
All tests are passing, including the new state override verification test.
Link to Devin run: https://app.devin.ai/sessions/b12c69957896406db06077a931654027