Skip to content

Add Lakebase autoscaling API support#141

Open
mattslack-db wants to merge 1 commit intodatabricks-solutions:mainfrom
mattslack-db:feature/lakebase-autoscaling-api
Open

Add Lakebase autoscaling API support#141
mattslack-db wants to merge 1 commit intodatabricks-solutions:mainfrom
mattslack-db:feature/lakebase-autoscaling-api

Conversation

@mattslack-db
Copy link
Copy Markdown

Summary

  • Support the new Lakebase autoscaling ws.postgres API alongside the existing ws.database API
  • When PGENDPOINT env var is set, uses ws.postgres.get_endpoint() for host resolution and ws.postgres.generate_database_credential(endpoint=...) for credential generation
  • Fully backwards compatible — falls back to existing PGAPPNAME/ws.database behavior when PGENDPOINT is unset

Test plan

  • Deploy with PGENDPOINT set to a Lakebase autoscaling endpoint and verify connectivity
  • Deploy without PGENDPOINT to confirm existing ws.database behavior is unchanged
  • Verify credential rotation works via the before_connect callback with both APIs

This pull request was AI-assisted by Isaac.

Support the new Lakebase autoscaling endpoints (ws.postgres) alongside
the existing ws.database API. When PGENDPOINT is set, uses
ws.postgres.get_endpoint() for host resolution and
ws.postgres.generate_database_credential(endpoint=...) for credential
generation. Falls back to the existing behavior when unset.

Co-authored-by: Isaac
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