Skip to content
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: Fix flow addition to session and handle IntegrityError for orphaned flows #4799

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

ogabrielluiz
Copy link
Contributor

We have encountered an issue with this one more time. Since it is not a breaking issue I decided we could use a warning instead.

I also added a session.add call for so we can update the flow.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Nov 22, 2024
@github-actions github-actions bot added the bug Something isn't working label Nov 22, 2024
Copy link

codspeed-hq bot commented Nov 22, 2024

CodSpeed Performance Report

Merging #4799 will degrade performances by 40.83%

Comparing fix-orphan-flows (cbf92a2) with main (214d5a9)

Summary

❌ 3 regressions
✅ 12 untouched benchmarks

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

Benchmarks breakdown

Benchmark main fix-orphan-flows Change
test_successful_run_with_input_type_text 174.4 ms 231 ms -24.49%
test_successful_run_with_output_type_any 179.2 ms 233 ms -23.07%
test_successful_run_with_output_type_debug 189.9 ms 321 ms -40.83%

@ogabrielluiz ogabrielluiz added the lgtm This PR has been approved by a maintainer label Nov 22, 2024
@ogabrielluiz ogabrielluiz requested a review from NadirJ November 22, 2024 21:26
@ogabrielluiz ogabrielluiz merged commit 4620669 into main Nov 22, 2024
19 of 26 checks passed
@ogabrielluiz ogabrielluiz deleted the fix-orphan-flows branch November 22, 2024 22:05
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
…ned flows (langflow-ai#4799)

* Handle IntegrityError specifically when assigning orphaned flows to superuser

* Add missing session.add(flow) to ensure flow is added to the session before commit
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:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant