-
Notifications
You must be signed in to change notification settings - Fork 881
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
Re-enable C#
arrow flight integration test
#6611
Merged
Merged
Changes from all commits
Commits
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 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 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
Oops, something went wrong.
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.
@CurtHagenlocher also mentions maybe the C# should be changed rather than the rust test harness: apache/arrow#44377 (comment)
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.
FWIW listen_on should probably be returning the resolved socket address.
Also localhost may not work on machines with dual stack IPv4 and IPv6, as the latter will be preferred
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.
👀
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.
Do you know how to get the resolved address? I tried
addr.ip()
but that still returns the unresolved port.Which prints out
I think only the actual
Server
knows the port after callinglisten
, but the tower/tonic thing only returns some sort of future (not a server that can be interrogated) 🤔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.
IIRC you bind the TCPListener - https://docs.rs/tokio/1.40.0/tokio/net/struct.TcpListener.html, and get the address of it https://docs.rs/tokio/1.40.0/tokio/net/struct.TcpListener.html#method.local_addr
You can then construct a https://docs.rs/tonic/latest/tonic/transport/server/struct.TcpIncoming.html and feed this to the tonic builder.
It's a bit convoluted, but it is possible
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.
I think my simple example from above does something like this (without the TcpIncoming) (binds to
0.0.0.0
and then getslocal_addr
) but that still seems to return 0.0.0.0It seems like this is what
listen_on
also tries to do 🤔arrow-rs/arrow-integration-testing/src/flight_server_scenarios/mod.rs
Lines 33 to 38 in 7781bc2
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 other places in the tests also use
localhost
as the hostname here as well:arrow-rs/arrow-integration-testing/src/flight_server_scenarios/middleware.rs
Line 103 in 7781bc2
So maybe this is a problem that we can address if someone has issues running the tests on their environment. It "works for me" locally and it works on CI so perhaps that is good enough
I'll wait a while longer to see if anyone else has any good ideas