Builds without a database are checked before a release (#151) #153
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba!153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/151-nodb-build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #151.
Summary
A page that reaches the database while prerendering now fails a quick local build with a clear message, and the release skill runs that build first, so it can no longer slip through to the image build (#121, #134).
DATABASE_URLis set empty, not unset, so Next doesn't take it from.env..next-nodbkeeps the check away from the dev server's and the e2e build's.next; ignored by git, Docker and ESLint.tsconfig.jsongets the two include lines Next adds for it.Evidence
await paramsin/c/[...slug]metadata) only showed indocker build, aserror parsing connection string.After: with that bug put back temporarily,
npm run build:nodbfails in ~20 s: Without it,build:nodbpasses.src/buildWithoutDatabase.test.ts: build with empty/missing URL → true; build with URL → false; runtime without URL → false.docker build --target buildpasses; lint, typecheck, 626 unit tests green. e2e not run: its build has a database, so nothing changes there.Merge Danger
Door: two-way
No migration, no runtime change: the query hook exists only when
next buildruns withoutDATABASE_URL.Blast Radius: build
The Docker build now gets the hooked client too; it passes, but a page that wrongly queried and got away with it during prerendering would now fail it with the new message instead. Starting an interactive transaction bypasses the hook (driver error as before), but those only run in actions.
🤖 Generated with Claude Code