fleet-memory/skills/hindsight-docs/references/developer
Chris Bartholomew dffb87080f
fix(migrations): bypass PgBouncer for advisory locks via MIGRATION_DATABASE_URL (#726)
* fix(migrations): use HINDSIGHT_API_MIGRATION_DATABASE_URL when set

Session-level advisory locks are broken when the database URL goes
through PgBouncer in transaction mode: the backend connection is
returned to the pool on COMMIT, orphaning the lock, so multiple pods
can simultaneously run migrations for the same schema.

When HINDSIGHT_API_MIGRATION_DATABASE_URL is set, use it for both
the advisory lock connection and the Alembic run.  Callers should
point this at the direct PostgreSQL endpoint (bypassing the pooler)
so the session-level lock is held for the full migration duration.

* refactor(migrations): move MIGRATION_DATABASE_URL to standard config

Wire HINDSIGHT_API_MIGRATION_DATABASE_URL through HindsightConfig
instead of reading os.getenv() directly in migrations.py. Add the
field to the dataclass, from_env(), log_config(), all call sites,
.env.example, and the configuration docs page.

* fix: update test mocks for migration_database_url kwarg and regenerate docs skill

---------

Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
2026-03-27 16:01:38 +01:00
..
api doc: add langgraph and nemoclaw (#633) 2026-03-20 16:18:05 +01:00
admin-cli.md Fix run-db-migration for all-tenant upgrades (#530) 2026-03-10 10:10:03 +01:00
configuration.md fix(migrations): bypass PgBouncer for advisory locks via MIGRATION_DATABASE_URL (#726) 2026-03-27 16:01:38 +01:00
development.md feat: add docs skill (#335) 2026-02-10 14:41:51 +01:00
extensions.md feat: introduce hindsight-api-slim and hindsight-all-slim packages (#560) 2026-03-13 13:50:03 +01:00
index.md doc: add langgraph and nemoclaw (#633) 2026-03-20 16:18:05 +01:00
installation.md docs: add supported platforms and Windows installation guide (#700) 2026-03-26 12:01:30 +01:00
mcp-server.md fix: doc build 2026-02-26 18:01:56 +01:00
models.md docs: add Volcano Engine as supported LLM provider (#715) 2026-03-26 18:21:34 +01:00
monitoring.md feat: add LiteLLM LLM provider for Bedrock and 100+ providers (#679) 2026-03-25 14:17:38 +01:00
multilingual.md feat: add docs skill (#335) 2026-02-10 14:41:51 +01:00
observations.md feat(skill): validate links, strip images, include openapi.json and changelog (#614) 2026-03-19 12:32:33 +01:00
performance.md Release v0.4.13 2026-02-19 18:46:07 +01:00
rag-vs-hindsight.md feat: add docs skill (#335) 2026-02-10 14:41:51 +01:00
reflect.md feat(skill): validate links, strip images, include openapi.json and changelog (#614) 2026-03-19 12:32:33 +01:00
retain.md feat(skill): validate links, strip images, include openapi.json and changelog (#614) 2026-03-19 12:32:33 +01:00
retrieval.md feat: add docs skill (#335) 2026-02-10 14:41:51 +01:00
services.md feat: add docs skill (#335) 2026-02-10 14:41:51 +01:00
storage.md feat: add docs skill (#335) 2026-02-10 14:41:51 +01:00