Repository navigation
pgvector-go: goal record - #32
Merged
Merged
Conversation
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.
v1.data.extensions · task 4/5 · pgvector-go
Summary
admin.Statushas anextensionslist, andReadyis falsewhenever a declared extension doesn't match the database.
go-database/postgres/pgvector. It holdsParseMetricover sqlate's metrictable. It wraps no pgvector-go type: its package doc shows applications using pgvector-go
directly.
sqlate's pgvector image, and an
integrationtier run locally bymise run acceptance.Its
currency.shis now sqlate's script, so it also checks the image and the pgvector ARG.record lives in sqlate, so sqlate's
pgvector-gobranch carries just that file.Core changes
admin's extension status. Readiness now covers extensions as well as sets: pending, not
offered by the image, and no update path all clear
Ready. The last two errors wrapErrConflictand keep sqlate's error in the chain.Startlogsextension pending; applyingbefore it applies.postgres/pgvector. The package imports only the standard library and sqlate'spostgres/pgvector. pgvector-go, pgx andsqlate/postgresare required only by its tests.Integration tier. It runs three live tests:
admin.Startinstallsvectorat the image's default on a fresh database, andStatusreports it installed and ready.
vectorcolumn round-trips pgvector-go values and NULL throughsql.Null[pgvector.Vector].The check now vets, fixes and lints with
-tags integration.Verify
mise run check: ✓ go-database (.,postgres,postgres/pgvector, tagged vet/fix/lint,lint-context, lint-references); ✓ sqlate
In go-database:
mise run currency→ prints nothing, exit 0.mise run db:up, thendocker compose exec -T postgres psql -U app -d app -Atc "select default_version from pg_available_extensions where name='vector'"→
0.8.7. Thenmise run db:down.mise run acceptance→ the stack comes up, all three live tests pass, the stack comes down,exit 0.
GOFLAGS=-timeout=1ns mise run acceptance→ exit 1, the compose log is printed, and thestack still comes down.
ARG PGVECTOR_VERSION=0.8.6by hand, runmise run currency→ it reportspgvector/pgvector 0.8.6 -> 0.8.7and exits 1. Revert the ARG.Decided without you
but it isn't one of the five permitted comment kinds. sqlate's header line ("A scan command
that fails fails currency.") states the behavior, so the script stays byte-identical to
sqlate's. This was the spec-reviewer's one gap.
-tags integration. These passes replaced theuntagged ones instead of running alongside them. The tagged pass also covers every untagged
file.
ExtensionStatustype with JSON tags. sqlate's type has no tags, so its JSONkeys would be capitalized.
Statuspasses an I/O error from reading extensions through unwrapped, as it does anaborted operation. A removed extension that is still installed logs the same pending line.
pgtest.Create, notMigratedWith.MigratedWithwould installvectorbeforeStartran, soStartwouldn't be what installed it.passed silently on an empty or shrunk list.
ParseMetric, the readiness andErrConflictrule,the integration tier).
sqlate-test-tierbacklog goal now covers go-database too, since neither repository hasa CI integration job.
sqlate-extension-match: admin's readiness re-derives sqlate'sunexported
classifyrule.principlesto promote.Redirects and escalations
MetricNamedis namedParseMetric.Merge danger: one-way door for both tags. Accepting authorizes these steps:
pgvector-gobranch.v0.13.0.pgvector-go-fixbranch swapspostgres/pgvector'sreplacefor thev0.13.0pin, mergeson green CI, and then tags
postgres/pgvector/v0.1.0.Once pushed,
Status.Extensions, its JSON, the readiness andErrConflictrule,ParseMetricand
ErrUnknownMetricare public. Blast radius: go-database consumers, starting withcapstone-athena.
Needs you: none