feat(webapp): per-client database pool and connect timeout overrides - #4515
Conversation
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (4)
📜 Recent review details⏰ Context from checks skipped due to timeout. (13)
WalkthroughDatabase configuration now supports separate pool and connection timeout settings for primary and run-ops writers and read replicas. Environment values are parsed as optional integers. Each client uses its specific settings when provided and shared timeout values otherwise. Datasource labels now distinguish control-plane, run-ops, and legacy run-ops clients. A change note documents the new configuration behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
3512762 to
9dbcc5f
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
9dbcc5f to
f188fe9
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
f188fe9 to
9ef9ac2
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Adds optional per-client env overrides for the Prisma pool_timeout and connect_timeout, one pair each for the writer and read replica of the control-plane, legacy run-ops, and run-ops databases, falling back to the shared DATABASE_POOL_TIMEOUT / DATABASE_CONNECTION_TIMEOUT when unset. This lets each database be tuned independently, e.g. a fail-fast connect timeout on one without changing the others. It also tags each client's queries with its specific datasource (control-plane, legacy-run-ops, or run-ops; writer or replica) so telemetry can attribute connection behavior per database. No behavior change until an override is set.
9ef9ac2 to
de14062
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
Follow-on to #4513. The database connect timeout is now honored, but a single global value has to serve three separate databases at once (control-plane, legacy run-ops, and run-ops). This adds optional per-client overrides for the Prisma pool and connect timeouts, one pair for the writer and one for the read replica of each of the three databases, each falling back to the shared
DATABASE_POOL_TIMEOUT/DATABASE_CONNECTION_TIMEOUTwhen unset.That lets one database's clients run a fail-fast connect timeout (with a bounded pool wait) while another keeps more headroom, without a single knob forcing the same tradeoff everywhere. No behavior change until an override is set.
It also tags each client's queries with its specific datasource (
control-plane/legacy-run-ops/run-ops, writer or replica) via thedb.datasourcespan attribute, so telemetry can attribute connection behavior to a specific database instead of just writer-vs-replica.