-
Notifications
You must be signed in to change notification settings - Fork 8.2k
refactor(auth): simplify flow retrieval by removing settings_service dependency #8956
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
Conversation
…s service dependency * 🛠️ (flows.py): Remove settings_service parameter from _read_flow and related functions to streamline flow retrieval logic. * 🔧 (flows.py): Adjust query to directly filter by user_id, enhancing clarity and reducing complexity.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes simplify the user authorization logic in the flow retrieval process by removing the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant DB
Client->>API: Request to read/update/delete flow (with flow_id, user_id)
API->>DB: Query flow where flow_id and user_id match
DB-->>API: Return flow (if found)
API-->>Client: Respond with flow data or error
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
* 🧪 (test_flows.py): Remove hardcoded user_id from flow creation tests to ensure user-specific data handling. * ✨ (test_flows.py): Add a new test to verify that users can only access their own flows, ensuring proper user isolation in flow retrieval. * 🔧 (test_flows.py): Implement user creation and cleanup logic to maintain test integrity and avoid side effects.
…dependency (langflow-ai#8956) * refactor: Simplify flow reading logic by removing unnecessary settings service dependency * 🛠️ (flows.py): Remove settings_service parameter from _read_flow and related functions to streamline flow retrieval logic. * 🔧 (flows.py): Adjust query to directly filter by user_id, enhancing clarity and reducing complexity. * test: Enhance flow retrieval tests with user isolation checks * 🧪 (test_flows.py): Remove hardcoded user_id from flow creation tests to ensure user-specific data handling. * ✨ (test_flows.py): Add a new test to verify that users can only access their own flows, ensuring proper user isolation in flow retrieval. * 🔧 (test_flows.py): Implement user creation and cleanup logic to maintain test integrity and avoid side effects.
Summary by CodeRabbit