Repository navigation
[Susan (Grok Bot)] chore: dev.sh DB health check uses pgPoolConfig - #16
Merged
Merged
Conversation
Route the psql-missing fallback in scripts/dev.sh through scripts/check-db.ts so it uses pgPoolConfig, matching the app pool on Neon URLs. Authored-by: Susan (Grok Bot) Co-authored-by: Grant Lindsay <glindsay65@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Authored by Susan (Grok Bot), not Grant.
Summary
The
psql-missing fallback inscripts/dev.shopened a rawpg.PoolfromDATABASE_URL. Every other pool (src/lib/prisma.ts,scripts/sync-resume.ts,prisma/seed.ts) goes throughpgPoolConfig(), which rewritessslmoderequire/prefer/verify-catoverify-fulland setsenableChannelBindingwhenchannel_binding=require.scripts/check-db.tsand call it withnpx tsxfrom that fallback. It buildsnew Pool(pgPoolConfig(process.env.DATABASE_URL)), runsSELECT 1, ends the pool, and exits 0 or 1.psqlbranch is unchanged. The page-count check only usespsqland has no node-pg fallback, so it is unchanged.sslmode, includingpostgresql://localhost:5432/fdc_website, is still passed through unchanged. Version is unchanged.Test plan
zsh -n scripts/dev.sh(script is zsh;sh -nis not the right check)npx tsc --noEmitnpm run test:run(7 files, 61 tests)DATABASE_URL=postgresql://127.0.0.1:1/fdc_website npx tsx scripts/check-db.tsexits 1 in under a second (connect ECONNREFUSED)/dev/nullstill exits 1 and prints nothingsslmode=require&channel_binding=require) exits 1 the same wayDATABASE_URLexits 1 withDATABASE_URL is not set.