Skip to content

feat: expand default hosts - #10047

Draft
shivanee-p wants to merge 2 commits into
mainfrom
shivaneep-mixin-host
Draft

shivanee-p wants to merge 2 commits into
mainfrom
shivaneep-mixin-host

Conversation

@shivanee-p

@shivanee-p shivanee-p commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Resolves b/589829381

bshaffer and others added 2 commits December 3, 2026 19:11
…fault_host

Resolve `universeDomain`, `universe_domain`, and `GOOGLE_CLOUD_UNIVERSE_DOMAIN` once at the start of `createStub()` in `grpc.ts` and `fallback.ts`, so certificate detection, mTLS endpoint rewriting, and validation all see a guaranteed non-empty `string`.

- Add `resolveUniverseDomain()` in `src/util.ts` to reject conflicting or explicit empty options, treat an empty `GOOGLE_CLOUD_UNIVERSE_DOMAIN` env var as unset, and default to `DEFAULT_UNIVERSE`.
- Default `_detectClientCertificate()` and `_mtlsServicePath()` to `DEFAULT_UNIVERSE`, and skip `.mtls.googleapis.com` rewriting outside `DEFAULT_UNIVERSE`.
- Inherit `gaxGrpc._servicePath` in `IamClient` and apply `universeDomain` to the proto `default_host` in `fallback.ts` when `opts.servicePath` is omitted.

Refs: b/589829381
…cationsClient

Derive the fallback servicePath for standalone OperationsClient and LocationsClient from the resolved universeDomain (explicit option, inherited GrpcClient option, or GOOGLE_CLOUD_UNIVERSE_DOMAIN) instead of hardcoding googleapis.com, while preserving explicit servicePath/apiEndpoint overrides and default scope handling.

This branch has not been deployed

No deployments
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