This repository was archived by the owner on Sep 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
Update InstantiatingGrpcChannelProvider to be tolerant of ipv6 addresses #768
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
81b3cbe
Update InstantiatingGrpcChannelProvider to be tolerant of ipv6 addresses
BenWhitehead a806232
Remote leftover printf
BenWhitehead 19e552c
Add javadoc to withEndpoint
BenWhitehead 67339e9
Update gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGr…
BenWhitehead File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
It looks like in case if there is no port at all, this code will try to treat the last segment of ipv6 as port number. For example in
2001:db8:85a3:8d3:1319:8a2e:370:73487348 becomes a port number.
I understand that it is unlikely case, but please consider handling it (i.e. add proper logic for both
ipv4andipv6cases, alsocolonis porbably a bad name here ans it should clearly indicate that we are searching for a port here).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.
The usage of
portbelow (1 and 2) explicitly necessitates a port being provided as part ofendpointsince there is no form of default port handling due to not having scheme be part ofendpoint. All tests defined in the corresponding test class always specifyhostname:port.I think if we wanted to update this class to support connections without port specified it'd be a lot more work than this.