feat: run the Hasura database on pgvector and add semantic search - #117
Merged
Merged
Conversation
The Hasura database image had no pgvector, so migration 1771200021000_standard_variable_embeddings failed on every deployment: could not open extension control file "/usr/local/share/postgresql/extension/vector.control" Point components.hasura_db.image at ghcr.io/mintproject/postgres-pgvector, which carries PostGIS 3.5 and pgvector 0.8.6. BREAKING CHANGE: the image is PostgreSQL 16. The previous default was PostgreSQL 10. PostgreSQL 16 refuses to start on PostgreSQL 10 data files. An existing deployment must dump, delete the PVC and restore. values.yaml carries the steps. Also add the semantic-search service. The metadata in mintproject/monorepo declares nine event triggers with webhook_from_env: SVO_SEMANTIC_SEARCH_WEBHOOK_URL. Hasura rejects the whole metadata apply when that variable is absent, so the Hasura pod always sets it, even when components.semantic_search.enabled is false. ARM is not covered. mintproject/monorepo builds postgres-pgvector for linux/amd64 only, so arm_image keeps the old PostGIS image.
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.
Problem
Every
hasura migrate applyfails. Migration1771200021000_standard_variable_embeddingsrunsCREATE EXTENSION vector. The chart pins the Hasura database topostgis/postgis:10-3.2-alpine, which ships no pgvector.The pgvector work in
mintproject/monorepochangedcompose.yamland the Tapis Pods deployment. It did not change this chart.Changes
values.yamlcomponents.hasura_db.image->ghcr.io/mintproject/postgres-pgvector:developvalues.yamlcomponents.semantic_searchblocktemplates/semantic-search.yamltemplates/hasura.yamlSVO_SEMANTIC_SEARCH_WEBHOOK_URLChart.yamlBreaking change: a data migration is required
The new image is PostgreSQL 16. The old default was PostgreSQL 10. PostgreSQL 16 refuses to start on PostgreSQL 10 data files. A
helm upgradealone leaves the database pod inCrashLoopBackOff.Each deployment must run these steps:
pg_dump.data-<release>-hasura-db-0.pg_restore.The PVC carries
helm.sh/resource-policy: keep, so Helm never deletes it for you.Why the webhook variable is always set
The metadata in
mintproject/monorepodeclares nine event triggers withwebhook_from_env: SVO_SEMANTIC_SEARCH_WEBHOOK_URL. Hasura rejects the wholemetadata applywhen the variable is absent. Setting it unconditionally keepsmetadata applyworking even when an operator disables the service. Override it withcomponents.semantic_search.environment.webhook_url.Verified
This was run on the shared MicroK8s dev cluster on 2026-09-12, by hand, in the order above.
hasura migrate applyhelm linthelm templatewith bothci/values files andtapis.test.values.yamlhelm templatewithsemantic_search.enabled=falseTwo limits reviewers must know
mintproject/monorepobuildspostgres-pgvectorforlinux/amd64only.arm_imagekeepsimresamu/postgis-arm64:12-3.4-alpine, which has no pgvector. An ARM deployment still cannot apply the embedding migration.develop. There is no released tag for this image yet.semantic-searchfalls back toglobal.imageTag; confirm thatghcr.io/mintproject/semantic-searchpublishes the tag your deployment pins.🤖 Generated with Claude Code
https://claude.ai/code/session_0162tbdGCuxbimJUmfCbz69q