Add pool_pre_ping option to SQLAlchemy engine configuration - #8549
MichalTorma wants to merge 1 commit into
Conversation
Updated SQLAlchemy engine initialization across multiple files to include the pool_pre_ping option, enhancing connection reliability by preemptively checking for closed connections. This change was made in models.py, sp7_build_models.py, and tests.py, and the SA_POOL_PRE_PING setting was added to the configuration in __init__.py.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe change adds ChangesSQLAlchemy pool pre-ping
Priority: ⬇️ Low Change: Feature Merge Risk: ⚪ Minimal · up to This change enables stale-connection checks across runtime, generated, and test engines without an identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (4 passed)
Full details: Automatic TestsExplanation The PR adds a new connection-pool behavior, but it adds no automatic test that verifies the behavior. The only test-file change updates the shared Resolution Add automatic tests for the new configuration. Assert that the runtime SQLAlchemy engines use Full details: Testing InstructionsExplanation The PR has no testing instructions. Its Resolution Add clear testing instructions to the PR description. State the backend test command, including the stored-query tests that exercise
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Updated SQLAlchemy engine initialization across multiple files to include the pool_pre_ping option, enhancing connection reliability by preemptively checking for closed connections. This change was made in models.py, sp7_build_models.py, and tests.py, and the SA_POOL_PRE_PING setting was added to the configuration in init.py.
Fixes #
Checklist
self-explanatory (or properly documented)
specify7/specifyweb/specify/management/commands/run_key_migration_functions.py
Line 50 in ea04665
Testing instructions
Summary by CodeRabbit