Skip to content

feat(psycopg): add AlloyDB connector support#568

Draft
cofin wants to merge 1 commit into
mainfrom
codex/psycopg-alloydb
Draft

feat(psycopg): add AlloyDB connector support#568
cofin wants to merge 1 commit into
mainfrom
codex/psycopg-alloydb

Conversation

@cofin

@cofin cofin commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • add opt-in sync AlloyDB Connector support for PsycopgSyncConfig
  • inject a connector-backed psycopg connection class into psycopg_pool.ConnectionPool
  • document the sync-only connector path and cover validation, routing, database-key mapping, async isolation, and cleanup with unit tests

Tests

  • uv run pytest tests/unit/adapters/test_psycopg -q --tb=short
  • uv run ruff check sqlspec/adapters/psycopg/config.py tests/unit/adapters/test_psycopg/test_cloud_connectors.py
  • uv run ruff format --check sqlspec/adapters/psycopg/config.py tests/unit/adapters/test_psycopg/test_cloud_connectors.py

@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.16129% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.70%. Comparing base (b4a7d05) to head (d8dd89c).

Files with missing lines Patch % Lines
sqlspec/adapters/psycopg/config.py 95.16% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #568      +/-   ##
==========================================
+ Coverage   75.68%   75.70%   +0.02%     
==========================================
  Files         449      449              
  Lines       59986    60044      +58     
  Branches     9144     9156      +12     
==========================================
+ Hits        45398    45457      +59     
+ Misses      11657    11655       -2     
- Partials     2931     2932       +1     
Flag Coverage Δ
integration 59.34% <30.64%> (-0.03%) ⬇️
py3.10 74.10% <91.93%> (+0.02%) ⬆️
py3.11 74.11% <91.93%> (+0.02%) ⬆️
py3.12 74.11% <91.93%> (+0.02%) ⬆️
py3.13 74.11% <91.93%> (+0.02%) ⬆️
py3.14 74.89% <91.37%> (+0.01%) ⬆️
unit 61.85% <90.32%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sqlspec/adapters/psycopg/config.py 88.60% <95.16%> (+1.91%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants