fleet-memory/skills/hindsight-docs/references
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
..
changelog fix: silence noisy google_genai.models INFO logging (#727) 2026-03-27 16:01:23 +01:00
developer fix(migrations): bypass PgBouncer for advisory locks via MIGRATION_DATABASE_URL (#726) 2026-03-27 16:01:38 +01:00
sdks fix: silence noisy google_genai.models INFO logging (#727) 2026-03-27 16:01:23 +01:00
best-practices.md doc: add langgraph and nemoclaw (#633) 2026-03-20 16:18:05 +01:00
faq.md doc: add langgraph and nemoclaw (#633) 2026-03-20 16:18:05 +01:00
openapi.json feat: add audit log for feature usage tracking (#717) 2026-03-27 09:52:03 +01:00