diff options
author | Florian Klink <flokli@flokli.de> | 2024-08-27T10·02+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-08-27T10·34+0000 |
commit | 2fa5e71d5e768f45d743347187f70404b3771e79 (patch) | |
tree | e112f26c8ae4e98bde1b709636060d340826aa62 /tvix/store | |
parent | d292203235ad69eea045febad7d59e2ac0e3a37d (diff) |
fix(tvix/store): restore v1alpha reflection endpoint r/8593
tonic-reflection 0.12.x moved from the v1alpha to v1 of the reflection protocol. However, most clients, like Postman, Kreya and evans don't support that one yet. Bump tonic-reflection to 0.12.2, which re-introduces v1alpha support alongside the v1 version of it, registering both services. This fixes the example documented in tvix/store/README.md, it was previously failing as evans couldn't find the v1alpha reflection service. See https://github.com/hyperium/tonic/pull/1888 for details. Change-Id: I55438877317f82dc39face13afeb9594cda07a4e Reviewed-on: https://cl.tvl.fyi/c/depot/+/12353 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Diffstat (limited to 'tvix/store')
-rw-r--r-- | tvix/store/Cargo.toml | 2 | ||||
-rw-r--r-- | tvix/store/src/bin/tvix-store.rs | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml index 0cbaa102f051..7df14ce89597 100644 --- a/tvix/store/Cargo.toml +++ b/tvix/store/Cargo.toml @@ -50,7 +50,7 @@ mimalloc = "0.1.43" [dependencies.tonic-reflection] optional = true -version = "0.12.0" +version = "0.12.2" [dependencies.bigtable_rs] optional = true diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index d9d5b1597bb7..6da239a8fee3 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -201,11 +201,18 @@ async fn run_cli(cli: Cli) -> Result<(), Box<dyn std::error::Error + Send + Sync #[cfg(feature = "tonic-reflection")] { - let reflection_svc = tonic_reflection::server::Builder::configure() - .register_encoded_file_descriptor_set(CASTORE_FILE_DESCRIPTOR_SET) - .register_encoded_file_descriptor_set(FILE_DESCRIPTOR_SET) - .build()?; - router = router.add_service(reflection_svc); + router = router.add_service( + tonic_reflection::server::Builder::configure() + .register_encoded_file_descriptor_set(CASTORE_FILE_DESCRIPTOR_SET) + .register_encoded_file_descriptor_set(FILE_DESCRIPTOR_SET) + .build_v1alpha()?, + ); + router = router.add_service( + tonic_reflection::server::Builder::configure() + .register_encoded_file_descriptor_set(CASTORE_FILE_DESCRIPTOR_SET) + .register_encoded_file_descriptor_set(FILE_DESCRIPTOR_SET) + .build_v1()?, + ); } let listen_address = &listen_args.listen_address.unwrap_or_else(|| { |