Skip to content

feat: add universe domain support for TPC - #557

Open
tianwarren123 wants to merge 5 commits into
mainfrom
feat/universe-domain-support
Open

feat: add universe domain support for TPC#557
tianwarren123 wants to merge 5 commits into
mainfrom
feat/universe-domain-support

Conversation

@tianwarren123

Copy link
Copy Markdown

Add universe_domain parameter to Connector and AsyncConnector classes to support TPC (Trusted Partner Cloud) universe domains. Changes include:

  • Dynamic AlloyDB API endpoint construction based on universe domain
  • GOOGLE_CLOUD_UNIVERSE_DOMAIN env var fallback
  • Credential universe domain validation
  • Unit tests for all new functionality

@tianwarren123
tianwarren123 requested a review from a team as a code owner August 7, 2026 23:21
@tianwarren123
tianwarren123 force-pushed the feat/universe-domain-support branch from 1bf866b to 95e4a06 Compare August 7, 2026 23:32
@tianwarren123
tianwarren123 enabled auto-merge (squash) August 7, 2026 23:32
@tianwarren123
tianwarren123 force-pushed the feat/universe-domain-support branch from 95e4a06 to 89a4756 Compare August 7, 2026 23:36
Add universe_domain parameter to Connector and AsyncConnector classes
to support TPC (Trusted Partner Cloud) universe domains. Changes include:

- Dynamic AlloyDB API endpoint construction based on universe domain
- GOOGLE_CLOUD_UNIVERSE_DOMAIN env var fallback
- Credential universe domain validation
- Unit tests for all new functionality
@tianwarren123
tianwarren123 force-pushed the feat/universe-domain-support branch from 89a4756 to fa3efef Compare August 7, 2026 23:41

@enocom enocom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll leave it to Rishabh to approve.

if universe_domain:
self._universe_domain: Optional[str] = universe_domain
else:
self._universe_domain = os.environ.get("GOOGLE_CLOUD_UNIVERSE_DOMAIN")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know Cloud SQL did this. I don't know why other than cover for a shortcoming in the auth library.

I think we should leave out this env var. We provide an API and callers may use it. If there's some standard we're missing, we can add it later. But if we add it now, it's ours forever.

Ditto below.

"alloydb.googleapis.com", "test-project", credentials, driver="pg8000"
)
transport = connector._client._client.transport
transport._wrapped_methods[transport.get_connection_info]._retry = Retry(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this get_connection_info wrapper being deleted? Also, there's already a wrapper for generate_client_certificate defined below. So we don't need to add it again.

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.

3 participants