Visitar URL original
ci: dao integration suites against PostgreSQL 18 + pgvector and MySQL 8.4 (GM-4) by yongjohnlee80 · Pull Request #537 · yongjohnlee80/golib · GitHub
Skip to content

ci: dao integration suites against PostgreSQL 18 + pgvector and MySQL 8.4 (GM-4) - #537

Merged
yongjohnlee80 merged 3 commits into
mainfrom
ci/integration-tests
Oct 30, 2026
Merged

yongjohnlee80 merged 3 commits into
mainfrom
ci/integration-tests

Conversation

@yongjohnlee80

Copy link
Copy Markdown
Owner

The integration-tag part of GM-4 (golib maturity audit): golib's dao suites now run in CI against real PostgreSQL and MySQL. Task: 2026-10-28-golib-maturity-ci-and-dependency-follow-ups-from-the-2026-10-28-audit (KB). It's independent of #536 (lint) and touches different jobs; whichever lands second pins its new uses: lines to SHAs as #536 does.

Why.

  • With no servers, every database test skips, and a skip looks like a pass.
  • The 10 //go:build integration files had stopped compiling: adr0017_integration_test.go and search_vm43_test.go both declared mustExec, and nothing built the tag. That includes the 1,602-line pinned-connection test.

Commits

  1. dao/postgres: the duplicate mustExec is removed. The two did the same thing, and the untagged one stays. go vet -tags integration ./dao/... is clean.
  2. .github/scripts/integration.sh plus a new integration job:
    • Servers: PostgreSQL 18 with pgvector (max_prepared_transactions=10, for the two-phase-commit tests) and MySQL 8.4, started with docker run. GitHub service containers can't pass server flags.
    • Run: go test -tags integration -race -count=1 ./dao/... with TEST_PGURL and TEST_MYSQL_DSN set.
    • Fails on any skip that names a service it provides (TEST_PGURL not set, TEST_MYSQL_DSN not set, max_prepared_transactions=). Other skips are counted and listed.
    • The script runs anywhere with Docker. GOLIB_IT_GO lets the run execute go elsewhere, as VM43 does through the gate image.

Verified on VM43 (ledger agents-review-and-tests/golib-integration-r0/):

  • 613 tests pass across dao, dao/deploy, dao/internal/stdsql, dao/mysql, dao/postgres and dao/sqlite, with 0 skips. That includes two-phase commit and the pgvector search cells.
  • The verifier is validated: with TEST_PGURL withheld, the gate fails and names each skipped test (deploy_test.go:291, adr0017_integration_test.go:86, …).

Not here: dao/bigquery's integration test, which needs a GCP project; and fuzz targets, which come next.

adr0017_integration_test.go and search_vm43_test.go each declared mustExec, so the package's
tests did not build with -tags integration. Nothing built them with the tag, so nobody saw it.
The two did the same; the untagged one stays.

Audit: golib maturity GM-4.
…tegration tag

.github/scripts/integration.sh starts PostgreSQL 18 with pgvector (max_prepared_transactions=10,
for two-phase commit) and MySQL 8.4 in containers. It runs go test -tags integration -race over
./dao/... with TEST_PGURL and TEST_MYSQL_DSN set, and fails on any skip that names a service it
provides. A database test that cannot reach its server skips, and a skip looks like every other,
so the gate counts them by name. The new integration job runs it; a machine with Docker can run
the same script.

VM43: 613 tests pass across dao, dao/deploy, dao/internal/stdsql, dao/mysql, dao/postgres and
dao/sqlite, with 0 skips. With TEST_PGURL withheld, the gate fails and names each skip.
dao/bigquery's integration tests need a GCP project and stay out.

Audit: golib maturity GM-4.
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Coverage check: PASS

  • Total: 90.97% (54001/59363) → 90.97% (54004/59363) (+0.01pp)
  • Changed blocks: N/A
File Base Head Delta Changed blocks State

Updated for bfdb1aa · workflow run · coverage job: success

Zen's note on #537: the wait was 120 tries of a command and a second's sleep, so a slow try
stretched it past its stated two minutes. It now ends at a deadline on bash's SECONDS, and each
try is bounded by timeout 10.
@yongjohnlee80
yongjohnlee80 marked this pull request as ready for review October 30, 2026 02:08
@yongjohnlee80

Copy link
Copy Markdown
Owner Author

Approval of record: Zen approved r0 with notes and the readiness delta r1 at bfdb1aa. Every hosted check is green at this head, and it shares no file with what main gained since its base. Marked ready at merge, per Johno's ruling.

@yongjohnlee80
yongjohnlee80 merged commit f78182a into main Oct 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant