Skip to content

fix(infra): remove the Supabase database selector - #754

Merged
thomasluizon merged 1 commit into
mainfrom
thomasluizon/ticket-1532-remove-supabase-db-selector
Oct 18, 2026
Merged

thomasluizon merged 1 commit into
mainfrom
thomasluizon/ticket-1532-remove-supabase-db-selector

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

Closes thomasluizon/orbit-tickets#1532

Both production API connection strings now always use the managed Render Postgres database. Removing the migration selector prevents a default plan from choosing the deleted Supabase database.

  • infra/variables.tf: remove api_database.
  • infra/configuration.tf: retain the existing Render Npgsql conversion, map both connection keys to it unconditionally, and remove the obsolete SSM data source. Keeping the existing conversion preserves the deployed Render connection string format.
  • infra/README.md: remove the database cutover instructions and obsolete SSM prerequisites; document the Render source and ordered cleanup.

No new external response fields are read. The existing Render connection conversion is unchanged.

Test evidence

  • terraform -chdir=infra init -backend=false -input=false: passed without production backend access.
  • terraform -chdir=infra fmt -check: passed.
  • terraform -chdir=infra validate -no-color: passed.
  • dotnet build Orbit.slnx: passed with zero errors; generated OpenAPI remained unchanged.
  • node --test infra/google-play-isolation.test.mjs infra/bff-forwarding.test.mjs infra/ses-isolation.test.mjs: 17 passed.
  • dotnet test tests/Orbit.Domain.Tests: 716 passed, exit 0.
  • dotnet test tests/Orbit.Application.Tests: 5520 passed, exit 0.
  • dotnet test tests/Orbit.Infrastructure.Tests: 3541 passed, exit 0.

No existing test covers the production database selector. An unchanged-test baseline and a strengthened-test failure with the defect present were not obtained. No test was added for this configuration removal; formatting and validation check the local configuration, while the production plan below must establish resource equivalence.

Plan proof

Production plan proof is pending the orchestrator, as required by the work order. No production state, secret values, or AWS parameters were accessed by this worker. No SSM parameters were deleted.

In the existing production Terraform execution environment, with the approved ignored infra/local.tfvars and its current image digests, domains and production IP allow list preserved, remove the obsolete api_database assignment and run from the repository root:

terraform -chdir=infra init -input=false
terraform -chdir=infra plan -input=false -var-file=local.tfvars -out=local.tfplan

Expected result: no resource changes. Every environment group, service and database must remain unchanged. Paste the actual plan summary here before deleting the obsolete parameters. This expected result is not an observed production plan.

Manual steps

  1. In the existing production Terraform execution environment, remove the obsolete api_database key from ignored infra/local.tfvars. Run the commands under Plan proof against the S3 production backend configured in infra/versions.tf. The actual plan must prove no resource changes and its summary must be recorded in this PR before cleanup. Stop on any proposed resource change.
  2. Only after that proof, in AWS Systems Manager > Parameter Store in us-east-2, delete /orbit/production/api/ConnectionStrings__DefaultConnection and /orbit/production/api/ConnectionStrings__SessionConnection. Do not open or retrieve their values. Verify both exact parameter names are absent from the Parameter Store list and record completion in this PR. This cleanup belongs to the orchestrator and remains pending.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes across all three files, including production environment-group wiring and remaining references to the removed selector.

  • Render-only database configuration: Both production connection keys now use the unchanged Render Npgsql conversion; the Supabase selector and its SSM data source are removed.
  • Cleanup sequencing: Documentation requires a production plan showing no resource changes before deleting the obsolete SSM parameters. That operational proof remains pending, as disclosed in the PR.
  • Verification: All 17 targeted infrastructure regression tests passed. Independent Terraform validation was unavailable because terraform version returned bash: line 1: terraform: command not found; live production equivalence was not verified.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@sonarqubecloud

Copy link
Copy Markdown

@thomasluizon

Copy link
Copy Markdown
Owner Author

Plan proof (orchestrator)

Production terraform plan against the S3 production backend, run read-only (-lock=false) with the Cloudflare and Render credentials and the ignored infra/local.tfvars (its api_database key removed for this branch), in two trees with identical inputs:

  • base 1bd0d265 (this pull request's base): Plan: 7 to add, 14 to change, 0 to destroy.
  • head e71f6fc8 (this pull request): Plan: 7 to add, 14 to change, 0 to destroy.

The two plan texts are byte-identical once the refresh lines are removed (diff prints 0 lines), so removing the api_database selector and the SSM data source changes no production resource. The 21 pending changes in both plans are existing drift from other unapplied work (the redesign web service and routing Worker, the BFF forwarding secret, the uploads IAM policy and the env group links that carry them); they are not part of this pull request and stay unapplied here. Both plans set production_redesign_web_digest to the same placeholder digest because the ignored tfvars predates that variable; the redesign service it creates is identical in both.

@thomasluizon
thomasluizon merged commit e2909b6 into main Oct 18, 2026
21 checks passed
@thomasluizon
thomasluizon deleted the thomasluizon/ticket-1532-remove-supabase-db-selector branch October 18, 2026 20:17
thomasluizon added a commit that referenced this pull request Oct 19, 2026
…, slip contract and the Supabase sign-in removal (#768)

* Stop Stripe and Play renewals when account deletion is confirmed (#746)

* fix: stop subscription renewal when account deletion is confirmed

* fix: restrict renewal restoration to an unexpired paid period

* fix: keep free account deletion independent of billing services

* fix: bound billing cancellation delays during account erasure

* fix: preserve renewal intent during deletion reconciliation

(cherry picked from commit 85d8824)

* docs: name Render web services in version floor preconditions (#755)

(cherry picked from commit 21615aa)

* fix(infra): use Render for production database connections (#754)

(cherry picked from commit e2909b6)

* test(habits): cover end date reactivation allowance through handler (#759)

(cherry picked from commit 16203d9)

* test(mcp): verify Pro access for OAuth and API keys (#760)

(cherry picked from commit 0a90f67)

* Cover calendar auto-sync scheduling and import reconciliation (ORB-199) (#761)

* test(calendar): cover auto-sync scheduler eligibility and batching

* test(calendar): cover import suggestion reconciliation filters

* test(calendar): isolate free plan eligibility from expiry

(cherry picked from commit 664c756)

* Clarify controller action cross-references in the agent catalog (#762)

(cherry picked from commit d9cda52)

* refactor(calendar): share legacy match key for sync and suggestions (#763)

(cherry picked from commit 8e754c4)

* Contract habit log slip classification schema (#718) (#764)

(cherry picked from commit b0d3ff4)

* fix(calendar): gate recurring event reconciliation (#765)

(cherry picked from commit c900dba)

* Gate rolling schema contractions behind deployment barriers (#766)

* feat: require deployment barriers for rolling schema contractions

* fix: keep quoted SQL comment markers from hiding contractions

* test: record the deployed habit log contract barrier

* ci: run the rolling contract gate only when its inputs change

The gate builds the infrastructure test project, which costs minutes on every
pull request. It now runs only when a migration, the barrier file or the gate
itself changes; the step before it already reads the same diff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: require barriers for unclassified ALTER TABLE actions

* test: isolate barrier unit coverage from checkout history

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 626c525)

* fix: require a session claim on access tokens (#767)

(cherry picked from commit 517ed1b)

* Deprecate legacy Google auth routes (#1528, part 1) (#753)

* Deprecate legacy Google auth routes for #1528

* Explain deprecated Google auth routes and annotate legacy tests

(cherry picked from commit 21f810f)

* Remove deleted Supabase sign-in path (#1528) (#752)

* Remove deleted Supabase sign-in path (#1528)

* Remove unused access-token validation catalog entries (#1528)

(cherry picked from commit 141a4a2)

* fix: bind carried schema barrier to the deployed redesign

Record the observed staging deployment and its drained predecessors without changing the migration gate. Regenerate the tracked gating matrix for the combined source. Refs thomasluizon/orbit-tickets#746.

* fix: retain deletion cancellation ownership across provider retries (#770)

* fix: persist deletion cancellation ownership before provider updates

* test: cover deletion intent commit and account changes

* fix: identify deletion-owned Stripe cancellations

Reconcile provider metadata before restoring renewal or retaining ownership, reject open cancellation transactions, and log skipped erasure rechecks.

Refs thomasluizon/orbit-tickets#1547

(cherry picked from commit a7d1cf2)

* test: drop the deprecation assertions the legacy Google route removal supersedes

The base merge brought #769's assertions that POST /api/Auth/google and
POST /api/Auth/operations/google stay available and deprecated. This carry
removes both routes (main's #1528 part 2), so those assertions no longer
have a subject.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant