fix(ci): postgres-shaped dummy DATABASE_URL for the build step - #80
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 2 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. ✨ 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe CI workflow’s quality job now uses a syntactically valid Postgres connection string for DATABASE_URL so that Neon’s client initialization succeeds during the Next.js build/page-data collection step without making any real database connections. Sequence diagram for CI build using dummy postgres DATABASE_URLsequenceDiagram
participant GitHubActions
participant quality_job
participant Next_build as NextBuild
participant neon_client as neon
GitHubActions->>quality_job: start quality job
quality_job->>quality_job: set env DATABASE_URL=postgresql://ci:ci@localhost:5432/ci
quality_job->>Next_build: bun run build
Next_build->>neon_client: import connection.ts (neon(DATABASE_URL))
neon_client-->>Next_build: parse postgres URL (no connection)
Next_build-->>quality_job: build succeeds
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider using a clearly non-routable host (e.g.
postgresql://ci:ci@127.254.0.1:5432/ci) or an invalid port to ensure this dummy DATABASE_URL can never inadvertently connect if future changes start opening connections during CI.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider using a clearly non-routable host (e.g. `postgresql://ci:ci@127.254.0.1:5432/ci`) or an invalid port to ensure this dummy DATABASE_URL can never inadvertently connect if future changes start opening connections during CI.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
CI has failed on master for weeks:
https://example.comsatisfies the zod.url()env check butneon()rejects a non-postgres connection string whensrc/server/db/connection.tsis imported during Next's page-data collection (/api/activity/combined). Use a well-formed dummy postgres URL — neon only parses it at import; nothing connects during build.Test plan
bun run buildwith the workflow's exact env — lint, typecheck, tests, and build all pass (30.8s).Summary by Sourcery
Build: