Skip to content

feat: Add Universe Domain Support #2435

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

Merged
merged 24 commits into from
Mar 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b49eeca
feat: Implement Universe Domain Support
lqiu96 Feb 16, 2024
e15caa2
chore: Clean up auth dependencies
lqiu96 Feb 20, 2024
4544811
chore: Resolve checkstyle issues
lqiu96 Feb 20, 2024
3b8a90a
chore: Determine service name from url
lqiu96 Feb 20, 2024
544ee32
chore: Return null for invalid rootUrl
lqiu96 Feb 22, 2024
2ba2504
chore: Add javadocs for Universe Domain changes in AbstractGoogleClient
lqiu96 Feb 29, 2024
25c9bc8
chore: Address checkstyle issues
lqiu96 Feb 29, 2024
13418de
chore: Add tests for AbstractGoogleClient
lqiu96 Feb 29, 2024
b8b233a
chore: Fix tests
lqiu96 Feb 29, 2024
dfd07a7
chore: Update docs for AbstractGoogleClient
lqiu96 Mar 4, 2024
a9a64db
chore: validateUniverseDomain does not return bool
lqiu96 Mar 4, 2024
0f905c0
chore: Move validateUniverseDomain() to parent impl
lqiu96 Mar 4, 2024
b2088be
chore: Update javadocs
lqiu96 Mar 5, 2024
fd1182a
chore: Add Env Var tests for GOOGLE_CLOUD_UNIVERSE_DOMAIN
lqiu96 Mar 6, 2024
3edfe45
chore: Fix lint issues
lqiu96 Mar 6, 2024
bba201a
chore: Fix env var tests
lqiu96 Mar 6, 2024
7a0b3fa
chore: Update logic for isUserConfiguredEndpoint
lqiu96 Mar 6, 2024
83612b6
chore: Throw IOException on validateUniverseDomain
lqiu96 Mar 6, 2024
1cfd93a
chore: Address PR comments
lqiu96 Mar 11, 2024
3fcb3c8
chore: Address PR comments
lqiu96 Mar 12, 2024
8d11d10
chore: Address PR comments
lqiu96 Mar 12, 2024
46781b1
chore: Address PR comments
lqiu96 Mar 12, 2024
9c8084c
chore: Validate on HttpCredentialsAdapter
lqiu96 Mar 12, 2024
94c42d1
chore: Address PR comments
lqiu96 Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: Address checkstyle issues
  • Loading branch information
lqiu96 committed Feb 29, 2024
commit 25c9bc8c184816f84671385c38328036e589924f
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ public void validateUniverseDomain() {
if (!getUniverseDomain().equals(Credentials.GOOGLE_DEFAULT_UNIVERSE)
&& !(httpRequestInitializer instanceof HttpCredentialsAdapter)) {
logger.warning(
"To configure the universe domain, the HttpRequestInitializer must be a HttpCredentialsAdapter. The Universe Domain value is set to be `googleapis.com`.");
"To configure the universe domain, the HttpRequestInitializer must be a " +
"HttpCredentialsAdapter. The Universe Domain value is set to be " +
"`googleapis.com`.");
expectedUniverseDomain = Credentials.GOOGLE_DEFAULT_UNIVERSE;
} else {
Credentials credentials =
Expand Down Expand Up @@ -386,13 +388,13 @@ public abstract static class Builder {
/** Whether discovery required parameter checks should be suppressed. */
boolean suppressRequiredParameterChecks;

/** User configured Universe Domain. Defaults to `googleapis.com` */
/** User configured Universe Domain. Defaults to `googleapis.com`. */
String universeDomain = Credentials.GOOGLE_DEFAULT_UNIVERSE;

/** Whether the user has configured an endpoint via {@link #setRootUrl(String)} */
boolean isUserConfiguredEndpoint = false;

/** The parsed serviceName value from the rootUrl from the Discovery Doc */
/** The parsed serviceName value from the rootUrl from the Discovery Doc. */
String serviceName;

/**
Expand Down