Repository navigation
fix(storage): make GrpcStorageOptions.Builder host configuration consistent with HttpStorageOptions.Builder - #15223
Closed
nidhiii-27 wants to merge 2 commits into
Closed
nidhiii-27 wants to merge 2 commits into
nidhiii-27 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a customHostConfigured flag in GrpcStorageOptions to track whether a custom host has been explicitly set, allowing the host to be dynamically resolved based on the universe domain when no custom host is provided. It also adds comprehensive unit tests to verify host resolution, resetting, and serialization behavior. The reviewer suggests optimizing the build() method to avoid a redundant second instantiation of GrpcStorageOptions when both customHostConfigured is false and universeDomain is null.
…n universeDomain is set Track whether a custom host was explicitly configured on GrpcStorageOptions.Builder so GrpcStorageOptions.Builder.build() preserves explicitly configured custom hosts when universeDomain is set, while continuing to resolve the default host from universeDomain when no custom host is configured. [Generated-by: AI]
…ault build() Only call super.setHost() and re-instantiate GrpcStorageOptions when !customHostConfigured and the resolved host differs from options.getHost(), avoiding a redundant second instantiation in the default case. [Generated-by: AI]
nidhiii-27
force-pushed
the
fix-grpc-storage-options-custom-host-universe-domain
branch
from
November 25, 2026 10:14
3913887 to
571106d
Compare
Contributor
Author
|
Superseded by #15238, which covers this case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GrpcStorageOptions.Builder now tracks whether a host was explicitly set via setHost(...) and overrides getDefaultHost() to return the default storage endpoint. Explicitly configured hosts are retained when universeDomain is set, while default hosts continue to resolve from universeDomain across build(), toBuilder(), and Java serialization round-trips. New unit tests in StorageOptionsBuilderTest cover explicit host retention, universeDomain host resolution, setHost(null) resets, and serialization behavior.