feat(NES-49): add an optional local Supabase parity stack via the Supabase CLI - #71
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds local Supabase CLI support: a ChangesLocal Supabase CLI Integration
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
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 `@Makefile`:
- Around line 129-135: The require-supabase-cli target only checks for the
binary's existence but does not validate the version, which can cause runtime
failures with older CLI versions incompatible with Postgres 17. Enhance the
require-supabase-cli target to add a version check in addition to the binary
presence check. Extract the version from supabase --version output and verify it
meets a minimum requirement (e.g., 2025 or later based on Postgres 17 support
added in April 2025), and provide a clear error message directing users to
update if their version is outdated.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 51081cc8-7fba-4cff-a92e-06771cf9aad8
📒 Files selected for processing (3)
MakefileREADME.mdsupabase/config.toml
…abase CLI - supabase/config.toml: pin a local stack scoped to Postgres + the Supavisor pooler (port 54322 db, 54329 pooler, transaction pool mode), with Auth, Storage, Realtime, Studio, and Edge Functions disabled — Nestova uses only the database (NES-23). - Makefile: add opt-in supabase-up / supabase-down / supabase-status targets wrapping the Supabase CLI, listed under make help. - README: a "Local Supabase via the CLI" subsection documenting the targets and an .env snippet wiring the local pooler/direct URLs with sslmode=require (the CLI's Postgres serves TLS, satisfying the supabase provider's TLS requirement). Why: lets contributors exercise the Supabase-shaped pooler path locally without a hosted project. Purely additive — compose.yaml and the make run / docker compose defaults are unchanged, so the standard workflow is unaffected.
f784238 to
3b84a99
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Provides an opt-in local Supabase stack (Postgres + the Supavisor pooler) via the Supabase CLI, so contributors can develop and test against a Supabase-shaped environment without a hosted project (NES-49). The default developer workflow stays on docker-compose Postgres.
Changes
supabase/config.toml: pins a local stack scoped to the database + pooler only (db:54322, pooler:54329, transaction pool mode). Auth, Storage, Realtime, Studio, and Edge Functions are disabled — Nestova uses only the database.supabase-up/supabase-down/supabase-statustargets wrapping the CLI, listed undermake help, each guarded by a clear error if the CLI isn't installed..envsnippet wiring the local pooler/direct URLs withsslmode=require(the CLI's Postgres serves TLS, satisfying the supabase provider's TLS requirement from NES-46).Acceptance criteria
make supabase-upstarts a local Supabase Postgres + pooler; the app connects withDB_PROVIDER=supabaseand the documented.env.NESTOVA_TEST_DATABASE_URL→ direct DB URL).docker compose up+make run) is unchanged; the new targets are clearly marked optional in README andmake help.Note: purely additive —
compose.yamland themake rundefaults are untouched.Jira: NES-49
Summary by CodeRabbit
Documentation
.envsetup, TLS guidance, and how to run the DB-gated test suite.Chores
makecommands to start, stop, and check the status of the local Supabase stack (with a fast check for the required Supabase CLI version).New Features