Skip to content

Propagate main to stripe - #234

Closed
version-incrementer[bot] wants to merge 2 commits into
stripefrom
auto-merge/main-to-stripe-20260729193119
Closed

Propagate main to stripe#234
version-incrementer[bot] wants to merge 2 commits into
stripefrom
auto-merge/main-to-stripe-20260729193119

Conversation

@version-incrementer

Copy link
Copy Markdown
Contributor

Summary

  • Auto-generated PR to propagate changes from main to the deployment branch
  • Opened because an automatic merge had conflicts that need manual resolution

🤖 Generated by the propagate workflow

github-actions and others added 2 commits July 14, 2026 21:40
Automatically generated by python-semantic-release
* fix: engine too many connections

Fix create_engine() connection leaks per request/call

* refactor: use lru cached engine

Use lru cached engine

* add pool_pre_ping and dispose()

* fix: address review feedback on engine cache

- Route rate_limit.py through the shared get_engine() cache instead of
  its own module-level singleton, so no second unmanaged pool survives
  clear_engine_cache() or goes stale when the connection URL changes.
- Guard the engine cache with a threading.Lock: sync dependencies run in
  FastAPI's threadpool, so concurrent first requests could race in
  get_engine() and orphan an undisposed engine, and clear_engine_cache()
  could hit a dict-mutated-during-iteration error.
- Remove the clear_engine_cache() side effect from tear_down_db(); test
  fixtures that relied on it now call it explicitly in their teardown.
- Make engine-cache tests isolation-safe via an engine_cache fixture so
  cleanup runs even when an assertion fails mid-test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Rafiuzzaman Khan <rafiuzzamank@gmail.com>
Co-authored-by: chriscarrollsmith <chriscarrollsmith@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants