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

fix: Fix grpc schema hack in flight integration test #1402

Merged
merged 1 commit into from
Mar 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ async fn consume_flight_location(
let mut location = location;
// The other Flight implementations use the `grpc+tcp` scheme, but the Rust http libs
// don't recognize this as valid.
location.uri = location.uri.replace("grpc+tcp://", "grpc://");
// more details: https://github.com/apache/arrow-rs/issues/1398
location.uri = location.uri.replace("grpc+tcp://", "http://");
Comment on lines 186 to +189
Copy link
Member

Choose a reason for hiding this comment

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

Just some context on this bit: Flight's Location is never actually directly used as a gRPC URI. The C++ and Java implementations take apart and reconstruct the URI, so, grpc+tcp was never menat to be passed to gRPC. You can see here: https://github.com/apache/arrow/blob/4ef95eb89f9202dfcd9017633cf55671d56e337f/cpp/src/arrow/flight/client.cc#L935-L939

I do wonder if gRPC got more strict. The last passing run used gRPC 1.43.2, the first failing run used gRPC 1.44.0. By my read, this is the responsible commit, first seen in gRPC 1.44.0: grpc/grpc@0deb64d

It adds the error message to hpack_parser.cc (see ReportMetadataParseError) and crucially adds new validation to metadata_batch.h (see HttpSchemeMetadata). So I guess this was new validation added in v1.44.0.


let mut client = FlightServiceClient::connect(location.uri).await?;
let resp = client.do_get(ticket).await?;
Expand Down