Skip to content

Refactor import style - #1701

Merged
Xuanwo merged 2 commits into
mozilla:mainfrom
tottoto:refactor-import-style
Mar 29, 2023
Merged

Xuanwo merged 2 commits into
mozilla:mainfrom
tottoto:refactor-import-style

Conversation

@tottoto

@tottoto tottoto commented Mar 29, 2023

Copy link
Copy Markdown
Contributor

Refactors the styles to import crates.

@sylvestre

Copy link
Copy Markdown
Collaborator

long overdue, thanks :)

@codecov-commenter

codecov-commenter commented Mar 29, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: +0.09 🎉

Comparison is base (da77709) 29.60% compared to head (5c31fb5) 29.69%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1701      +/-   ##
==========================================
+ Coverage   29.60%   29.69%   +0.09%     
==========================================
  Files          49       49              
  Lines       17056    17054       -2     
  Branches     8213     8211       -2     
==========================================
+ Hits         5049     5065      +16     
+ Misses       7007     7001       -6     
+ Partials     5000     4988      -12     
Impacted Files Coverage Δ
src/cache/cache.rs 38.43% <ø> (ø)
src/cache/disk.rs 35.61% <ø> (ø)
src/cache/gcs.rs 9.80% <ø> (ø)
src/compiler/c.rs 38.16% <ø> (-0.46%) ⬇️
src/compiler/clang.rs 52.73% <ø> (ø)
src/compiler/compiler.rs 36.25% <ø> (ø)
src/compiler/diab.rs 47.96% <ø> (ø)
src/compiler/gcc.rs 55.56% <ø> (+0.20%) ⬆️
src/compiler/msvc.rs 44.76% <ø> (-0.11%) ⬇️
src/compiler/nvcc.rs 35.32% <ø> (ø)
... and 10 more

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Xuanwo
Xuanwo merged commit a2d1009 into mozilla:main Mar 29, 2023
@tottoto
tottoto deleted the refactor-import-style branch March 29, 2023 13:08
tottoto pushed a commit to tottoto/sccache that referenced this pull request Feb 6, 2026
…lla#1701)

this fixes mozilla#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: mozilla#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

Development

Successfully merging this pull request may close these issues.

4 participants