Skip to content

[codex] Fix Postgres managed SNI dbname routing#586

Merged
bill-ph merged 1 commit into
mainfrom
codex/postgres-sni-dbname-priority
May 20, 2026
Merged

[codex] Fix Postgres managed SNI dbname routing#586
bill-ph merged 1 commit into
mainfrom
codex/postgres-sni-dbname-priority

Conversation

@bill-ph
Copy link
Copy Markdown
Collaborator

@bill-ph bill-ph commented May 20, 2026

Summary

  • make Postgres managed SNI/dbname auth snapshot-atomic
  • keep explicit startup database as the routing database when present
  • require managed SNI and requested database to resolve to the same org
  • add DNS-safe org-name SNI resolution for hyphenated org hostnames with underscore database names
  • keep database_name SNI fallback and Flight behavior for follow-up PRs

Validation

  • go test ./controlplane/configstore -run TestDatabaseNameForSNIPrefix|TestResolveSNIPrefix|TestResolvePostgresConnection
  • go test -tags kubernetes ./controlplane -run TestPostgres|TestFlightValidator
  • go test ./controlplane/configstore
  • go test ./controlplane
  • go test -tags kubernetes ./controlplane
  • just test-controlplane-k8s
  • just lint
  • git diff --check origin/main...HEAD

Split context

This is PR1 from the larger SNI/dbname split. It leaves database_name SNI fallback and Flight behavior unchanged so those can be reviewed separately.

@bill-ph bill-ph force-pushed the codex/postgres-sni-dbname-priority branch from 0a42ec7 to 196867d Compare May 20, 2026 18:51
@bill-ph bill-ph marked this pull request as ready for review May 20, 2026 18:57
@bill-ph bill-ph merged commit 1b8b01e into main May 20, 2026
22 checks passed
@bill-ph bill-ph deleted the codex/postgres-sni-dbname-priority branch May 20, 2026 19:04
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