-
Notifications
You must be signed in to change notification settings - Fork 847
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
Add gRPC reflection support to arrow flight #7009
base: main
Are you sure you want to change the base?
Conversation
Addresses apache#1706, adding a constant to the gRPC generated code so it is possible to include the Flight and Flight SQL APIs in a `tonic-reflection` service. Testing: ``` grpcurl --plaintext localhost:8082 list ```
Addresses apache#1706, adding a constant to the gRPC generated code so it is possible to include the Flight and Flight SQL APIs in a `tonic-reflection` service. Testing: ``` grpcurl --plaintext localhost:8082 list ```
@@ -78,6 +78,7 @@ tracing-log = { version = "0.2" } | |||
tracing-subscriber = { version = "0.3.1", default-features = false, features = ["ansi", "env-filter", "fmt"] } | |||
tokio = { version = "1.0", default-features = false, features = ["macros", "rt", "rt-multi-thread"] } | |||
tokio-stream = { version = "0.1", features = ["net"] } | |||
tonic-reflection = "0.12.3" |
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.
Maybe we should put the addition in this PR behind a feature flag and mark this dependency as optional?
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.
yes please
Update: I see this is only a dev dependency -- so I think it is ok not to feature flag it
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.
Thank you @jacobsimpson
When I tried to re-create the checked in binrary (on a mac), it seems to be different
How did you generate the binary in this PR?
$ rm arrow-flight/src/sql/flight_sql_descriptor.bin
$ ./arrow-flight/regen.sh
...
$ git status
On branch add-file-descriptor-set
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: arrow-flight/src/sql/flight_sql_descriptor.bin
(I think this is the root cause of the CI failure as well: https://github.com/apache/arrow-rs/actions/runs/12917873056/job/36070514891?pr=7009)
I used In the mean time, following that test procedure locally I see:
|
There might be a challenge here. From what I can tell, the file descriptor set is itself a serialized proto message.
And serialized proto messages are not intended to be cannonical. The docs have a list of example conditions that can cause the serialization to change, however it is intentionally incomplete. I'll continue to look into this, however at the moment it appears that we can't depend on one machine being able to produce the same file descriptor sets as another machine. |
Can the descriptor be used by a machine on which it wasn't created 🤔 Maybe we would have to always regenerate this file on build (rather than have it checked in) That comes with its own problems (e.g. increasing the reuqired depenednecies to build arrow-flight) |
Which issue does this PR close?
Closes #1706.
Rationale for this change
I'd like to include the Flight service in the reflection service in one of my projects.
What changes are included in this PR?
tonic-reflection
to the dev dependencies socargo test --doc
andcargo test --doc --features "flight-sql-experimental"
work.Are there any user-facing changes?
New constants should be visible to library consumers. Should be backwards compatible.
Testing
Using a simple test service initialised using the reflection code in the rustdocs,
grpcurl
says: