Skip to content

Choose a tag to compare

@Eiley2 Eiley2 released this 09 Feb 06:03
v1.0.5
b9daff6

Release Notes - v1.0.5

Highlights

  • Fixed leaked advisory lock-holder sessions that could block subsequent CI runs.
  • Hardened stale-lock recovery for create with safer targeting and retry behavior.
  • Added stronger regression coverage, including real grant-permission verification for app users.

What Changed

  • Lock reliability in scripts/preview-branch.sh:

    • Track and terminate the exact PostgreSQL backend PID used by the lock-holder session.
    • Keep stale-lock cleanup scoped to application_name=postgres-branching-lock-holder.
    • Preserve timeout recovery flow (cleanup + retry) for lock acquisition.
  • Regression tests for lock behavior:

    • tests/test_create_action_integration.sh
      • run create twice and assert no lingering lock-holder session
      • inject synthetic stale lock-holder and verify auto-cleanup + retry path
      • strengthen cleanup for lock-holder backends
    • tests/test_create_action.sh
      • make mock psql counter concurrency-safe with file locking
      • align negative-path env setup consistency
  • Grant-permission coverage improvements:

    • tests/test_reset_action.sh
      • add grant SQL coverage for reset flow with APP_DB_USER
    • tests/test_create_action_integration.sh
      • validate effective read/write privileges for APP_DB_USER
      • validate default privileges on new tables/sequences created after grant
    • tests/test_reset_action_integration.sh
      • same effective-permission and default-privilege validation after reset

Validation

Executed locally and in integration Docker PostgreSQL 18:

  • bash tests/test_create_action.sh
  • bash tests/test_reset_action.sh
  • bash tests/test_delete_action.sh
  • bash tests/test_create_action_integration.sh
  • bash tests/test_reset_action_integration.sh
  • bash tests/test_delete_action_integration.sh

Compatibility

  • No breaking input/output changes.
  • Existing workflows remain compatible.

What's Changed

  • fix: prevent leaked advisory lock holders and add regression tests by @Eiley2 in #2

Full Changelog: v1.0.4...v1.0.5