Repository navigation
Drivine 0.9.0, with the store layout migration it needs on Postgres - #78
Open
jasperblues wants to merge 1 commit into
Open
jasperblues wants to merge 1 commit into
jasperblues wants to merge 1 commit into
Conversation
Moves Drivine from 0.6.0 to 0.9.0 in the pom and the codegen build. From 0.8.0 Drivine keeps a Postgres graph in store layout 2 and refuses one written in layout 1, as prod's was by 0.6.0. StoreLayoutMigrationRunner migrates it once, in place, declaring every @NodeFragment on the classpath: a dry run by default, writing only with LAYOUT_MIGRATE=true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F8aCDTpKMpmaai34YTCX4y
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.
Moves Drivine from 0.6.0 to 0.9.0, in the pom and in
codegen-gradle.Warning
Don't deploy before prod's database is migrated. From 0.8.0 Drivine keeps a Postgres graph in store layout 2, and refuses one written in layout 1 on its first connection. Prod's Cloud SQL database was written by 0.6.0, in layout 1. Deployed as it is, this fails at startup with
StoreLayoutException: The graph 'drivine' on Postgres was written in store layout 1….What's here
StoreLayoutMigrationRunner: an env-gated test class, likeNeo4jToPostgresMigration, that runs Drivine'sStoreLayoutMigration. It declares every@NodeFragmentundercom.embabel(guide's, the chat store's and the RAG graph's), so their dates, moments and floats are rewritten as their kinds. It is a dry run unlessLAYOUT_MIGRATE=true. See Drivine's guide to migrating a store layout.Goes with embabel/embabel-agent-rag-graph#82 and embabel/embabel-chat-store#56. Merge those first, so this builds against their 0.9.0 snapshots.
Tested
./mvnw verify: 211 tests passed, 1 skipped (MigratedDataReadBackTest, which is env-gated).seed-postgresartifact was applied: 3,012 nodes and 4,363 edges.MIGRATED.docs_textSearchanddocs_vectorSearchover MCP returned the migrated chunks.createdAtdates that will be. Rehearse once on apg_dumpof prod before the cutover.Runbook
pg_dump -t 'drivine_*'throughcloud-sql-proxy, restore it locally, then run the dry run and the migration below against the copy. Start guide on this branch against it, and drop the copy afterwards (it holds users' data).gcloud run services update embabel-guide --ingress=internal. The migration refuses a graph that is written to while it runs.pg_dump -t 'drivine_*'.cloud-sql-proxy. The migration takes two connections, which the pool cap of 5 allows.apply-seeduntil prod is migrated, so the two layouts don't mix.Rollback: the migration has no down-migration. Restore the backup from step 3, then move traffic back to the 0.6.0 revision.
🤖 Generated with Claude Code
https://claude.ai/code/session_01F8aCDTpKMpmaai34YTCX4y