feat: Add PSC DNS and Global Write Endpoint support to Python Connector - #1446
Merged
Conversation
hessjcg
force-pushed
the
psc-dns-support
branch
2 times, most recently
from
July 28, 2026 16:31
279c124 to
2a6e9fa
Compare
kgala2
approved these changes
Aug 11, 2026
- Implement transient vs non-transient error detection in MonitoredCache. - Detect immutable instance DNS names using the corrected regex. - Avoid checking error message strings by using custom exception type (DnsLoopError). Address review comments: - kgala2: 'Should we have a try catch block of this sort to have a graceful shut in case of transient failures?' - hessjcg: 'Use an error code. Don'\''t check error message strings.' - hessjcg: 'The correct logic for detecting an immutable instance dns name: IF name matches /\.sql(-\w+)?\.goog$/ AND name does not match /\.global\.sql(-\w+)?\.goog$/'
hessjcg
force-pushed
the
psc-dns-support
branch
from
August 11, 2026 23:21
2a6e9fa to
2c91982
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Private Service Connect (PSC) DNS Name Resolution & Fallback feature enables the Python connector to securely connect to Cloud SQL database instances using Private Service Connect (PSC) DNS, custom domain names (CNAMEs), and Global Write Endpoints.
The connector can now dial PSC instances using:
Its regional DNS hostname (e.g., 0123456789ab.fedcba9876543.us-central1.sql-psc.goog)
A custom domain CNAME pointing to the instance PSC DNS hostname
A Global Write Endpoint DNS hostname (e.g., 0123456789ab.fedcba9876543.global.sql-psc.goog)
The connectors will dynamically resolve this hostname to its real Cloud SQL instance connection name via the SQL Admin API.
For Global Write Endpoints (which use the "global" region in their DNS name), the resolver bypasses direct API resolution (as "global" is not a valid API region) and forces fallback to CNAME resolution. This CNAME should point to the active regional instance DNS hostname, enabling automatic failover.
See GoogleCloudPlatform/cloud-sql-go-connector#1106