Repository navigation
OPN2: Hyperdrive and the migration ladder - #7
Merged
Merged
Conversation
infra/hyperdrive and infra/db-migrate arrive from orun-cloud ffb71be69 as they are, with the changes design §11 names, made the way lumen makes them. Hyperdrive keeps its state on the platform, builds its origin from the SUPABASE_PROJECT_REF and SUPABASE_DB_PASSWORD secrets openproduct-supabase published, and publishes WIRING_OPENPRODUCT_HYPERDRIVE instead of writing Secrets Manager. Its token is brokered from the openproduct Cloudflare connection (hyperdrive-edit). db-migrate loses its AWS parameters and builds @openproduct/db through stack-tectonic 0.22.0's buildFilter. The runner reads its project from SUPABASE_PROJECT_REF and drops @aws-sdk/client-secrets-manager. A new migration is scheduled through the input edge on openproduct-db instead of a mirrored migrations.lock. The merge applies stage, then prod: two Hyperdrive configs and the 52-step ladder on both databases. Orun-Task: OPN-7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The third task of OPN2: Hyperdrive over openproduct's two Supabase projects, and the migration ladder on both. This PR's merge creates two Hyperdrive configs (
stg-openproduct-stage,prod-openproduct-prod) and applies the 52-step ladder toopenproduct-stage, thenopenproduct-prod. On this PR, Hyperdrive runsterraform.plan-onlyand the migrations rundb-migrate.plan, which is offline.infra/hyperdrive(openproduct-hyperdrive)From orun-cloud
ffb71be69, with only the changes design §11 names, made the way lumen'scloudflare-hyperdrivemakes them:backend "http" {}.SUPABASE_PROJECT_REFandSUPABASE_DB_PASSWORD, which OPN2: the Supabase projects come up #6's apply published. The derivation is the old payload's:db.<ref>.supabase.co:5432, user and databasepostgres.wiringoutput,{hyperdrive_id, hyperdrive_name}, becomesWIRING_OPENPRODUCT_HYPERDRIVEviasecretOutputs. core reads it when it goes live (the next task).CLOUDFLARE_HYPERDRIVE_TOKENcomes from theopenproductCloudflare connection (hyperdrive-edit), on stage and prod. Prod also gainedCLOUDFLARE_ACCOUNT_ID.cloudflare ~> 4.30, and caching on.infra/db-migrate(openproduct-db-migrate)awsRegion,awsAccountIdandsecretName. stack-tectonic's schema closes its parameters, and nothing reads them now.buildFilter: "@openproduct/db", read from stack-tectonic 0.22.0, which is the pin this PR moves to. Its only change is that parameter (feat(db-migrate): buildFilter names the package the runner is built from (0.22.0) sourceplane/stack-tectonic#23).SUPABASE_ACCESS_TOKENis brokered (management-access), andSUPABASE_PROJECT_REFwas published by OPN2: the Supabase projects come up #6.migrations.lock.openproduct-dbis aninput: trueedge instead, so any change underpackages/dbschedules the migration job. Apply is idempotent and refuses a changed checksum.The runner
SUPABASE_PROJECT_REF(loadProjectRef, with a test) and drops@aws-sdk/client-secrets-manager.Checks (local)
@openproduct/db: 24 files and 574 tests pass, 1 skippedPackages in scope: @openproduct/db. The built CLI'splanlists the ladder offline, andapplywithout the ref fails namingSUPABASE_PROJECT_REF.terraform validateandorun validatepass.orun task check OPN-7: 4 changed components, all inside the contract.openproduct-db.🤖 Generated with Claude Code