Skip to content
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: Add universe domain #3087

Closed
wants to merge 10 commits into from
Closed

Feat: Add universe domain #3087

wants to merge 10 commits into from

Conversation

PhongChuong
Copy link
Contributor

@PhongChuong PhongChuong commented Jan 22, 2024

This PR adds the ability to set the universe domain and validate that the parameters are correct prior to each RPC. This is done by wrapping the existing RPC with the provided validation ServiceOption method. The PR does not change existing functionality of BigQuery and all existing unit and integration tests passes for the default universe domain. Manual testing was performed on a non-default universe domain. However, IT will require additional work (as it require additional credential setup) and will be included in a future PR.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #3088 ☕️

@PhongChuong PhongChuong requested a review from a team as a code owner January 22, 2024 18:58
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/java-bigquery API. labels Jan 22, 2024
@PhongChuong PhongChuong requested a review from a team as a code owner January 22, 2024 19:11
Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

Two things:

  • testing appears to be missing is something that exercises the invalid combination of mismatched universe in credentials and service option.

  • ensure that the host/endpoint functions properly when issuing rpcs, though this may make more sense out of band as a smoke test until we have a better way of doing universe integration testing.

}
} else {
// This calls the backend without the retry wrapper so first validate the universe domain.
Copy link
Contributor

Choose a reason for hiding this comment

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

for the purposes of standardizing the pattern here, is it worth using validateAndRunWithRetries here, but passing in a static retry config that only allows a single invocation rather than using getOptions().getRetrySettings()?

}
});
return new PageImpl<>(new JobPageFetcher(serviceOptions, cursor, optionsMap), cursor, jobs);
} catch (IllegalArgumentException | IOException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to catch/translate the potential RetryHelper.RetryHelperException (even though we didn't appear to previously)?

@PhongChuong PhongChuong deleted the universeDomain branch January 23, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/java-bigquery API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support universe domain feature
2 participants