Skip to content

refactor(api): use sessionmaker in datasource provider service#34811

Merged
asukaminato0721 merged 1 commit intolanggenius:mainfrom
carlos4s:refactor/sessionmaker-datasource-provider
Apr 9, 2026
Merged

refactor(api): use sessionmaker in datasource provider service#34811
asukaminato0721 merged 1 commit intolanggenius:mainfrom
carlos4s:refactor/sessionmaker-datasource-provider

Conversation

@carlos4s
Copy link
Copy Markdown
Contributor

@carlos4s carlos4s commented Apr 9, 2026

Summary

  • Replace with Session(db.engine) + session.commit() with sessionmaker(bind=db.engine).begin()
    in datasource_provider_service (10 blocks)
  • Read-only .no_autoflush blocks left unchanged
  • Updated test fixture to mock both Session (read-only) and sessionmaker (commit blocks)

Part of #24245

Test plan

  • ruff check passes
  • 63 datasource_provider_service tests pass

@dosubot dosubot bot added size:M This PR changes 30-99 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.

@asukaminato0721 asukaminato0721 added this pull request to the merge queue Apr 9, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 9, 2026
Merged via the queue into langgenius:main with commit a76a887 Apr 9, 2026
27 checks passed
@carlos4s carlos4s deleted the refactor/sessionmaker-datasource-provider 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:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants