Skip to content

Conversation

@Cristhianzl
Copy link
Member

@Cristhianzl Cristhianzl commented Jan 2, 2025

This pull request includes several changes to improve error handling, update flow data processing, and enhance the frontend functionality. The most important changes include refining exception handling in the update_flow function, ensuring session commits only when active, and adding a new test for moving flows between folders.

Backend Changes:

Frontend Changes:

…d in the database during flow update

📝 (flows.py): Improve error handling and rollback database session in case of exceptions during flow update
📝 (flows.py): Refactor code to handle unique constraint errors and provide more informative error messages
📝 (utils.py): Refactor get_webhook_component_in_flow function to handle cases where flow_data may not have 'nodes' attribute
@Cristhianzl Cristhianzl self-assigned this Jan 2, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jan 2, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 2, 2025
@Cristhianzl Cristhianzl marked this pull request as draft January 2, 2025 16:26
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 2, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 2, 2025

CodSpeed Performance Report

Merging #5516 will degrade performances by 42.59%

Comparing cz/fix-move-flow-folder (123f52e) with main (40925e8)

Summary

❌ 3 regressions
✅ 12 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main cz/fix-move-flow-folder Change
test_get_and_cache_all_types_dict 1.1 ms 1.9 ms -42.59%
test_successful_run_with_input_type_text 222.8 ms 249.5 ms -10.7%
test_successful_run_with_output_type_debug 250.3 ms 332.7 ms -24.76%

…r folder buttons for improved accessibility and testing

✨ (general-bugs-move-flow-from-folder.spec.ts): add test to ensure user can move flow from one folder to another in the frontend application
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 2, 2025
@Cristhianzl Cristhianzl marked this pull request as ready for review January 2, 2025 18:16
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 2, 2025
…l data inconsistency

♻️ (service.py): refactor with_session method to handle session commit and rollback more effectively
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 3, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 6, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 13, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 13, 2025
… and adding comments for clarity

🔧 (chat.py): refactor code to create a fresh session for database operations and improve session management in build_flow function
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 13, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 13, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 13, 2025
@Cristhianzl Cristhianzl added this pull request to the merge queue Jan 13, 2025
@Cristhianzl Cristhianzl removed this pull request from the merge queue due to a manual request Jan 13, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 13, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jan 13, 2025
@ogabrielluiz ogabrielluiz added this pull request to the merge queue Jan 13, 2025
Merged via the queue into main with commit e7a2005 Jan 13, 2025
38 checks passed
@ogabrielluiz ogabrielluiz deleted the cz/fix-move-flow-folder branch January 13, 2025 22:53
mieslep pushed a commit to mieslep/langflow that referenced this pull request Jan 15, 2025
…nd add folder-moving tests (langflow-ai#5516)

* 🐛 (flows.py): Fix issue where flow data was not being properly updated in the database during flow update
📝 (flows.py): Improve error handling and rollback database session in case of exceptions during flow update
📝 (flows.py): Refactor code to handle unique constraint errors and provide more informative error messages
📝 (utils.py): Refactor get_webhook_component_in_flow function to handle cases where flow_data may not have 'nodes' attribute

* ✨ (sideBarFolderButtons/index.tsx): add unique id attribute to sidebar folder buttons for improved accessibility and testing
✨ (general-bugs-move-flow-from-folder.spec.ts): add test to ensure user can move flow from one folder to another in the frontend application

* 🐛 (flows.py): remove unnecessary session rollback to prevent potential data inconsistency
♻️ (service.py): refactor with_session method to handle session commit and rollback more effectively

* style: adjust line breaks for readability

* style: reorder imports

* fix: ruff error try300

* [autofix.ci] apply automated fixes

* fix: mypy error module has no attribute "timeout"

* 🐛 (flows.py): remove unnecessary error handling code and improve exception handling for better error propagation and clarity

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/services/database/service.py

Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]>

* use model dump besides overwrite value

* [autofix.ci] apply automated fixes

* 📝 (chat.py): improve code readability by refactoring session handling and adding comments for clarity
🔧 (chat.py): refactor code to create a fresh session for database operations and improve session management in build_flow function

* [autofix.ci] apply automated fixes

* refactor: remove unused session parameter from build_flow function in chat.py

---------

Co-authored-by: italojohnny <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]>
@yangxikun yangxikun mentioned this pull request Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants