You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following changes are made outside of the design doc specifications or assuming few things:
Node ID Suffix and UUID Size: While the design document suggests a 64-bit integer for the UUID, this PR maintains the existing 32-bit int (generated via Random().nextInt()) to remain consistent with the current implementation's ID generation logic.
Ampersand Decoding (%26): The resolver now utilizes getRawQuery() instead of getQuery() for detecting and stripping the force-xds flag. This approach prevents a "splitting bug" where an encoded ampersand (%26) in a parameter value would be decoded to a literal & and incorrectly interpreted as a parameter separator.
Separate Locks for Bootstrap Caching: I have introduced separate locks (BOOTSTRAP_LOCK and FORCE_XDS_BOOTSTRAP_LOCK) for managing the standard and forced xDS bootstrap configurations. This provides logical isolation and ensures that Interconnect clients using force-xds can initialize immediately without being blocked by threads waiting on potentially slow metadata server calls in the standard GCP detection path.
URI Normalization via io.grpc.Uri: Even in the legacy java.net.URI constructor, we now use io.grpc.Uri to perform the transformation. This ensures consistent behavior across both constructors, particularly regarding "empty" vs "absent" authorities. Using the gRPC-specific Uri class ensures that hierarchical URIs like google-c2p:///svc (empty authority) are correctly reconstructed as dns:///svc or xds://.../svc rather than being mangled into invalid formats.
Flexible Query Param Value Handling and Case Sensitivity for force-xds: The implementation treats the force-xds parameter key as case-sensitive to align with standard gRPC naming conventions. However, it provides flexible support for different value formats: the resolver recognizes both the standalone flag (?force-xds) and explicit key-value pairs like ?force-xds=true or ?force-xds=1. To avoid misinterpretation, the logic explicitly returns false only when the value is a case-insensitive match for "false" or is exactly "0", ensuring that common truthy values like true or 1 are correctly handled as enabled
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
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.
Implements go/directpath-interconnect-client
CC: @anicr7