Skip to content

refactor(api): use sessionmaker in workflow & RAG pipeline services#34805

Merged
asukaminato0721 merged 1 commit intolanggenius:mainfrom
carlos4s:refactor/sessionmaker-workflow-rag-pipeline
Apr 9, 2026
Merged

refactor(api): use sessionmaker in workflow & RAG pipeline services#34805
asukaminato0721 merged 1 commit intolanggenius:mainfrom
carlos4s:refactor/sessionmaker-workflow-rag-pipeline

Conversation

@carlos4s
Copy link
Copy Markdown
Contributor

@carlos4s carlos4s commented Apr 9, 2026

Summary

  • Replace with Session(bind=db.engine) as session, session.begin(): + session.commit() with
    sessionmaker(bind=db.engine).begin() in workflow_service and rag_pipeline
  • Replace with Session(bind=engine, expire_on_commit=False) + session.commit() with
    sessionmaker(bind=engine, expire_on_commit=False).begin() in workflow_draft_variable_service
  • Read-only session blocks left unchanged
  • No test changes needed

Part of #24245

Test plan

  • ruff check passes
  • 108 workflow_service tests pass
  • 249 rag_pipeline tests pass

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. refactor labels Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Pyrefly Diff

No changes detected.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 9, 2026
@asukaminato0721 asukaminato0721 added this pull request to the merge queue Apr 9, 2026
Merged via the queue into langgenius:main with commit be1f4b3 Apr 9, 2026
27 checks passed
@carlos4s carlos4s deleted the refactor/sessionmaker-workflow-rag-pipeline branch April 9, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants