-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement support for Trusted Partner Cloud #1552
Conversation
🤖 I have created a release *beep* *boop* --- <details><summary>4.3.0</summary> ## [4.3.0](https://togithub.com/googleapis/gax-nodejs/compare/v4.2.1...v4.3.0) (2024-01-31) ### Features * implement support for Trusted Partner Cloud ([#1552](https://togithub.com/googleapis/gax-nodejs/issues/1552)) ([d51218c](https://togithub.com/googleapis/gax-nodejs/commit/d51218c23d4afe437285a55a44a39f64bdb3736d)) ### Bug Fixes * do not throw DeprecationWarnings for legacy retry behavior ([#1551](https://togithub.com/googleapis/gax-nodejs/issues/1551)) ([2f39306](https://togithub.com/googleapis/gax-nodejs/commit/2f39306a441ce08374fe069ab1e1892871715a77)) </details> --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
if (!options.universeDomain) { | ||
options.universeDomain = 'googleapis.com'; | ||
} | ||
if (options.universeDomain) { | ||
const universeFromAuth = await this.auth.getUniverseDomain(); | ||
if (universeFromAuth && options.universeDomain !== universeFromAuth) { | ||
throw new Error( | ||
`The configured universe domain (${options.universeDomain}) does not match the universe domain found in the credentials (${universeFromAuth}). ` + | ||
"If you haven't configured the universe domain explicitly, googleapis.com is the default." | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await this.auth.getUniverseDomain()
is called even if there is no universe domain configured in the options (because it then falls back to googleapis.com
) which takes a considerable amount of time. In my case around 300ms. Should it really work that way? @alexander-fenster
This change slows down my project testing setup a lot because each test-bigtable creation takes around 300ms longer.
Client libraries will start passing
universeDomain
tocreateStub
method for both gRPC and REST transports. Perform some validation as required.Related: googleapis/google-auth-library-nodejs#1732