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

tonic-reflection is still using deprecated file descriptor set reflection_v1alpha1 #1685

Open
dipjyotimetia opened this issue Apr 16, 2024 · 1 comment · May be fixed by #1701
Open

tonic-reflection is still using deprecated file descriptor set reflection_v1alpha1 #1685

dipjyotimetia opened this issue Apr 16, 2024 · 1 comment · May be fixed by #1701

Comments

@dipjyotimetia
Copy link

Bug Report

Version

v0.11.0

Platform

UNIX

Crates

https://crates.io/crates/tonic-reflection

Description

The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated.
https://github.com/grpc/grpc-go/blob/master/reflection/grpc_reflection_v1alpha/reflection.pb.go#L43

hence better to update or support for latest version v1

https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
https://github.com/grpc/grpc-go/tree/master/reflection

@dipjyotimetia dipjyotimetia changed the title tonic-reflection is still using deprecated file descritor set reflection_v1alpha1 tonic-reflection is still using deprecated file descriptor set reflection_v1alpha1 Apr 16, 2024
@dipjyotimetia
Copy link
Author

image

cratelyn added a commit to cratelyn/tonic that referenced this issue May 15, 2024
this fixes hyperium#1685.

 ### 🩹 changes

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
cratelyn added a commit to cratelyn/tonic that referenced this issue May 15, 2024
this fixes hyperium#1685.

 ### 🩹 changes

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
cratelyn added a commit to cratelyn/tonic that referenced this issue May 16, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 16, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 20, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 20, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 20, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

* `HttpsUriWithoutTlsSupport` is now gated behind the `transport`
  feature flag, because it is not used otherwise.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 20, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

* `HttpsUriWithoutTlsSupport` is now gated behind the `tls`
  feature flag, because it is not used otherwise.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 20, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

* `HttpsUriWithoutTlsSupport` is now gated behind the `tls`
  feature flag, because it is not used otherwise.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 20, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

* `HttpsUriWithoutTlsSupport` is now gated behind the `tls`
  feature flag, because it is not used otherwise.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to penumbra-zone/tonic that referenced this issue May 20, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

* `HttpsUriWithoutTlsSupport` is now gated behind the `tls`
  feature flag, because it is not used otherwise.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to penumbra-zone/tonic that referenced this issue May 20, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

* `HttpsUriWithoutTlsSupport` is now gated behind the `tls`
  feature flag, because it is not used otherwise.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 21, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
cratelyn added a commit to cratelyn/tonic that referenced this issue May 23, 2024
this fixes hyperium#1685.

in penumbra-zone/penumbra#4392, we observed that tonic servers do not
properly support reflection when servicing a request sent by recent
versions of [`grpcurl`], after [v1.8.8] began using
`grpc.reflection.v1.ServerReflection`. (see fullstorydev/grpcurl#407)

these lead to an error regarding an unexpected status code, like this:

```
❯ grpcurl --version
grpcurl v1.9.1

❯ grpcurl -vv grpc.testnet.penumbra.zone:443 list
Failed to list services: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 405 (Method Not Allowed); malformed header: missing HTTP content-type
```

this adds the v1 reflection definition to `tonic-reflection`, which was
observed as fixing these issues for our gRPC endpoint.

 ### 🩹 changes

changes in this commet are as follows:

* vendors the `v1` definition of [`reflection.proto`][proto].

* renames the (deprecated) `v1alpha` definition to
  `reflection_v1alpha.proto`.

* `tonic_reflection::generated::grpc_reflection_v1` links to the
  generated Rust code (created by running `cargo run --package codegen`).

* `tonic_reflection::generated::FILE_DESCRIPTOR_SET` is replaced by
  `tonic_reflection::generated::{FILE_DESCRIPTOR_SET_V1ALPHA, FILE_DESCRIPTOR_SET_V1}`.

* `tonic_reflection::pb` now contains namespaced
  `tonic_reflection::pb::{v1alpha, v1}` submodules. (**NB: this is a
  breaking change to the public `tonic-reflection` API.**)

* `tonic_reflection::server` is updated to use the generated
  `tonic_reflection::pb::v1` code.

[v1.8.8]: https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.8
[proto]: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto
[grpcurl]: https://github.com/fullstorydev/grpcurl

---

fixes: hyperium#1685
x-ref: penumbra-zone/penumbra#4392
co-authored-by: Conor Schaefer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant