feat(relay): provision the Vitess database ahead of the Postgres cutover - #5305
feat(relay): provision the Vitess database ahead of the Postgres cutover#5305juliusmarminge wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Needs human review This PR provisions new production MySQL/Vitess database infrastructure ahead of a Postgres-to-Vitess migration. Production infrastructure changes of this significance warrant human review, even when the code diff is small. You can customize Macroscope's approvability policy. Learn more. |
Phase 1 of the relay Postgres -> Vitess migration: create the t3coderelay-vitess MySQL database in the prod stack and apply the checked-in baseline schema via the alchemy migration runner, while the worker keeps running on Postgres. This lets DMS replicate production data into the target before the cutover PR flips Hyperdrive. See docs/operations/relay-postgres-to-vitess-migration.md (cutover PR) for the full runbook. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
779a484 to
394dead
Compare
Phase 1 of the relay Postgres → Vitess migration (see the stacked cutover PR for the full picture and runbook).
Adds
RelayMysqlDatabase(t3coderelay-vitess, us-west, PS_20) to the prod stack with the checked-inmigrations/mysqlbaseline. Deploying this creates the empty Vitess database and applies the schema via the alchemy migration runner —relay_migrationsbookkeeping included — while the worker keeps running on Postgres. That lets AWS DMS replicate production data into the target before the cutover PR flips Hyperdrive.No worker or runtime changes; Postgres remains the live database.
🤖 Generated with Claude Code
Note
Medium Risk
Prod infra now provisions an additional live database and applies schema on deploy; misconfiguration could affect migration bookkeeping or DMS target readiness, but runtime traffic stays on Postgres until cutover.
Overview
Phase 1 of the relay Postgres → Vitess migration: prod deploys now also provision PlanetScale MySQL (
t3coderelay-vitess, us-west, PS_20) whenrelayDatabaseModeisshared-database, alongside the existing Postgres database.A new checked-in MySQL baseline in
migrations/mysqlcreates allrelay_*tables and indexes (mirroring Postgres) and is applied viarelay_migrationson deploy. The worker and Hyperdrive still use Postgres; nothing reads or writes MySQL until the cutover PR.Adds the Drizzle snapshot for the MySQL baseline migration metadata.
Reviewed by Cursor Bugbot for commit 394dead. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Provision Vitess MySQL database ahead of Postgres cutover for relay service
t3coderelay-vitess, us-west, PS_20, 2 replicas) in db.ts whenrelayDatabaseModereturns"shared-database".relay_*tables, indexes, and schema matching the existing Postgres structure.shared-databasedeployments now provision an additional database resource withRemovalPolicy.retain().Macroscope summarized 394dead.