Introduce PONDER_STATEMENT_TIMEOUT setting to ponder app#2219
Conversation
🦋 Changeset detectedLatest commit: 7ad964a The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR makes Ponder’s Postgres statement timeout configurable through ChangesPonder Statement Timeout Environment Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Pull request overview
This PR introduces a pnpm patch to the ponder dependency so ENSNode’s Ponder-based indexing can use a configurable Postgres statement_timeout via a new PONDER_STATEMENT_TIMEOUT environment variable, addressing failures caused by the hard-coded 2-minute timeout.
Changes:
- Adds a pnpm patch for
ponder@0.16.6to sourcestatement_timeoutfromprocess.env.PONDER_STATEMENT_TIMEOUT(instead of a fixed 2 minutes) and log the effective config. - Registers the patch in root
package.jsonpnpm.patchedDependencies. - Updates
pnpm-lock.yamlto include the patch hash and patched resolution.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
patches/ponder@0.16.6.patch |
Patches Ponder’s Postgres pool creation to use an env-configurable statement_timeout. |
package.json |
Adds ponder@0.16.6 to pnpm.patchedDependencies. |
pnpm-lock.yaml |
Records the patched dependency metadata and updated resolution. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@patches/ponder`@0.16.6.patch:
- Line 9: The new statementTimeout value is created with
Number(process.env.PONDER_STATEMENT_TIMEOUT) which yields NaN for non-numeric
env values; update the initialization around statementTimeout to validate and
coerce the environment input (process.env.PONDER_STATEMENT_TIMEOUT) to a safe
integer and fall back to the default (2 * 60 * 1000) when parsing fails or
results in NaN or non-positive values, then pass that validated numeric value
into the pg.Pool config; reference the statementTimeout constant and the
PONDER_STATEMENT_TIMEOUT env var when making this change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 47615901-69ce-4a15-993e-9f4b32359631
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
package.jsonpatches/ponder@0.16.6.patch
🚀 Preview Packages -
|
5072cc0 to
eb5aaf5
Compare
This aims to resolve the database performance issue where some important internal poder queries fail due to 2 minutes statement timeout. We need to try increasing the statement timeout for the PG Pool connections.
eb5aaf5 to
957455c
Compare
…age database timeouts more granularly.
|
@greptile review |
Greptile SummaryThis PR makes the Ponder database statement timeout configurable. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "docs(changeset): Introduced `PONDER_STAT..." | Re-trigger Greptile |
This aims to resolve the database performance issue where some important internal poder queries fail due to 2 minutes statement timeout. We need to try increasing the statement timeout for the PG Pool connections.
Lite PR
Tip: Review docs on the ENSNode PR process
Summary
ponderdependency where the hardcoded SQL statement timeout got replace with thePONDER_STATEMENT_TIMEOUTenv var read (optional, defaults to the previously hardcoded value of 2 minutes).Why
Testing
Notes for Reviewer (Optional)
Pre-Review Checklist (Blocking)